Pages

Wednesday, November 06, 2019

Vanilla javascript equivalent of $(document).ready()

Note to self (from SO):

document.addEventListener("DOMContentLoaded", function() {
  // code...
});