Sha256: 7fcdf4027aabb19119bf97ff2f3d457542ed903ca8734aed4cc4389f646ed4c2
Contents?: true
Size: 415 Bytes
Versions: 15
Compression:
Stored size: 415 Bytes
Contents
let readyHandlers = []; const handleState = () => { if (["interactive", "complete"].indexOf(document.readyState) > -1) { while(readyHandlers.length > 0) { (readyHandlers.shift())(); } } }; class ReadyHandler { constructor () { document.onreadystatechange = handleState; } ready (handler) { readyHandlers.push(handler); handleState(); } } export default new ReadyHandler();
Version data entries
15 entries across 15 versions & 1 rubygems