From page Javascript, is there any way to know when a Webkit-based browser (particularly interested in recent Chrome, but a generic solution would be nice) has finished drawing the page, and/or has finished resolving all styles? Mozilla browsers have the MozAfterPaint event that's quite handy for this sort of thing.
views:
29answers:
1
A:
I think you can do it by using JavaScript to query a property which depends on all element having been placed: for example, get the object property whose value is the location of the last element on the DOM.
ChrisW
2010-09-15 17:54:01
Thanks, I'll try that.
Zack
2010-09-15 22:17:14
It turns out that that's not the same thing. Webkit (and Gecko too) can unblock Javascript that's waiting for location properties after they *position* everything, which happens well before they actually *draw* everything.
Zack
2010-09-22 22:31:41