[ANSWERED] javascript – Attach onDomContentLoaded function call to DOM object in HTML file
Solution 1 : I think you can write it like this: window.addEventListener('DOMContentLoaded', (event) => { console.log(this); }); Problem : <div id = "myGrid" onDomContentLoaded = "console.log('this')"></div> Is there a way…