vanilla js documentready code example Example: document ready vanilla js if (document.readyState === "complete") { init(); }