11 lines
299 B
JavaScript
11 lines
299 B
JavaScript
7 years ago
|
define(function () {
|
||
|
return {
|
||
|
onReady: function (cb) {
|
||
|
if (document.readyState === 'complete') { return void cb(); }
|
||
|
document.onreadystatechange = function () {
|
||
|
if (document.readyState === 'complete') { cb(); }
|
||
|
};
|
||
|
}
|
||
|
};
|
||
|
});
|