What is window.onpaint?

javascript

Solution

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`.

Problem

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?

Original source

Related problems