About document.readyThere is some effort going on, documented the WHATWG standard repository, in order to bring a document.ready Promise like behavior to any page. Today, a simple tweet of mine simplified the fuss: document.ready = new Promise(r => /^loaded|complete$/.test(document.readyState) ? r() : document.addEventListener('DOMContentLoaded', r)); â Andrea Giammarchi (@WebReflection
{{#tags}}- {{label}}
{{/tags}}