Load event not working while used with a selector element

Below is my <script> tag:

var2=document.querySelector('html')

var2.addEventListener('load',function(){alert('yo')});

why is onload not working?

And this is not just with html tag but with basically any selector.

14 thoughts on “Load event not working while used with a selector element”

  1. 309938 807819I cannot thank you fully for the blogposts on your web page. I know you placed lots of time and effort into all of them and hope you know how considerably I appreciate it. I hope I will do precisely exactly the same for another individual at some point. Palm Beach Condos 766598

    Reply