智能照明系统APP-本地串口
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
LightingSystemApp-serial/.svn/pristine/0b/0b137853e4e1eaed210deee91c1...

26 lines
610 B

var fns = [];
var listener;
var doc = document;
var hack = doc.documentElement.doScroll;
var domContentLoaded = 'DOMContentLoaded';
var loaded = (hack ? /^loaded|^c/ : /^loaded|^i|^c/).test(doc.readyState);
if (!loaded) {
doc.addEventListener(
domContentLoaded,
(listener = function() {
doc.removeEventListener(domContentLoaded, listener);
loaded = 1;
while ((listener = fns.shift())) {
listener();
}
})
);
}
exports = function(fn) {
loaded ? setTimeout(fn, 0) : fns.push(fn);
};
module.exports = exports;