โ†

Javascript: Run on DOM loaded

window.addEventListener("DOMContentLoaded", function() {
  alert("hi")
})

I always forget the name DOMContentLoaded. The function runs when the DOM is parsed and deferred scripts are downloaded and executed.

javascript
I've removed disqus comments
Instead, press this
to express thanks
So far, 0 people have pressed the octopus
I'm no longer visiting the Reddit tabloid. It's anger-inducing and divisive
I'm writing small thoughts here