Legend-of-iPhoenix / cemetech-userstyle

iPhoenix's Spiffy Cemetech Userstyle
MIT License
9 stars 4 forks source link

Use DOMContentLoaded #24

Closed Eeems closed 3 years ago

Legend-of-iPhoenix commented 3 years ago

I picked the load event here mostly because some of the Tweaks may depend on it while others won't be harmed by it.

Additionally, I want the page to be interactive as fast as possible, so that means running as few scripts as possible before load.

Eeems commented 3 years ago

You likely can avoid some repaints if you split out some stuff to run in DOMContentLoaded that would be making larger DOM changes, sure it slows down first paint slightly, but it's probably going to still result in a faster time to interactive technically.