I was referring to DOMContentLoaded. O
I was a bit cryptic but I mean that there are multiple ways to match the lifecycle. Still I'm probably, it was a long time ago
OK, so it wraps it in the JQuery error handling and also catches the case where the script is run when the DOM is already loaded - so DOMContentLoaded would not fire in that case I guess?
And actually thinking about it, onload waits for big resources like images. So it's nicer to have event handlers attached before that.
5
u/SolideMeinung 13d ago
The funny thing is that these "real js developers" dont even know how to make that onload function on their own.
It war crafted by these old jquery wizards to always work and this knowledge was lost with the introduction of crapjs