DOMContentLoaded and Safari
- Comments:
- here.
Often, you will want some scripts to run when the page has loaded, even if the images on it haven’t. I wrote up some stuff about this under Best pre-onload. My full onDOMReady script looks like:
|
|
However, Safari will not load pages that use this, since it has document.addEventListener, but does not create DOMContentLoaded events. So, I had to create a nasty little browser check rule:
|
|
I’d rather not have to do things like this. Why not?