document.addEventListener("DOMContentLoaded", function(event) {
console.log("DOM fully loaded and parsed");
});
function startAfter (delay, callback) {
const elapsed = Date.now() - performance.timing.navigationStart
if (elapsed >= delay) {
callback()
} else {
setTimeout(callback, delay - elapsed)
}
}
document.addEventListener("DOMContentLoaded", () => {
startAfter(2000, () => console.log("DOM fully loaded and parsed"))
})