[webkit-dev] Catching events in JavaScript and the onload event

Luka Napotnik luka.napotnik at gmail.com
Mon Oct 1 01:02:02 PDT 2012


Hello.

Thanks for the reply. So my best bet is to add some sort of a timeout that
will trigger the rendering and hoping that the page is fully loaded? If I
would implement such a signal that triggers itself when all the resources
are 100% ready(DOM + resources) what's the best place to look at?

And .. is there a way to look if the JS engine idles or is executing code?

Greets,
Luka

On Mon, Oct 1, 2012 at 9:54 AM, Mihai Balan <mibalan at adobe.com> wrote:

> Well, about your second question – onload does **NOT** guarantee that the
> document is done rendering. All it does say is that all the HTML code was
> loaded and the DOM tree corresponding to this „initial” snapshot has been
> created. It does not cover things like DOM altering via script, image
> loads, etc. And as far as I know, there’s no way to tell with 100%
> certainty that your page has finished loading **everything** - especially
> if there’s JavaScript involved.****
>
> ** **
>
> Hope this helps,****
>
> m.****
>
> ** **
>
> *Mihai Balan* | Quality Engineer / WebKit team |  mibalan at adobe.com |+4-031.413.3653 / x83653 |
> *Adobe Systems Romania*****
>
> ** **
>
> *From:* webkit-dev-bounces at lists.webkit.org [mailto:
> webkit-dev-bounces at lists.webkit.org] *On Behalf Of *Luka Napotnik
> *Sent:* Thursday, September 27, 2012 2:55 PM
> *To:* webkit-dev at lists.webkit.org
> *Subject:* [webkit-dev] Catching events in JavaScript and the onload event
> ****
>
> ** **
>
> Hello.****
>
> ** **
>
> I'm trying to figure out how to give a WebKit program hints that
> JavaScript is going to change the DOM structure my manipulating it's tree
> (e.g. IMG 'src' attribute change). Can anyone give me some pointers where
> should I look at.****
>
> ** **
>
> And another related question... The 'onload' event should be triggered
> only then when all resources are loaded and the DOM tree is constructed. In
> other words, the page is ready to be rendered to the user. But, as I use
> Gtk+ and the off-screen widget I can explicitly 'draw' the WebKit surface
> when I receive an 'onload' event from Webkit. But the problem is that the
> page is some times still half-rendered (missing images). Any ideas why is
> the event behaving this way?****
>
> ** **
>
> Best regards,
> ****
>
> ** **
>
> --
> Greets,
> Luka Napotnik,
>
> www: http://napotnik.info****
>



-- 
Greets,
Luka Napotnik,

www: http://napotnik.info
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20121001/67ebed53/attachment.html>


More information about the webkit-dev mailing list