cara memeriksa apakah jendela dimuat javascript
function checkLoaded() {
return document.readyState === "complete" || document.readyState === "interactive";
}
console.log(checkLoaded()) // true or false
Undefined