I was going to ASAP script that checks if body tag is loaded, but it causes whole page to freeze.
Here it is:
while (!document.body)
if (document.body) console.log('loaded');
This of course wouldn't work properly in all cases, but I'm puzzled why this becomes an infinite loop and freezes the page.