What Is Window.onpaint?
Someone recommended here that window.onpaint be used to run some javascript before page load. I've never actually seen this before, could someone explain its usage/usefulness?
Solution 1:
From the MDN :
onpaint doesn't work currently, and it is questionable whether this event is going to work at all, see bug 239074.
So the usefulness is zero.
It might depend on your exact use case but if you want to run a script "before page load", the simplest solution is probably to put it in the head
.
Post a Comment for "What Is Window.onpaint?"