[webkit-dev] Alter DOM before display

martin.cocoa at free.fr martin.cocoa at free.fr
Tue Nov 20 16:42:42 PST 2007


Hi,

I asked this question to webkitsdk-dev, but I didn't get an anwser. Maybe I'll
be more lucky here...


Is it possible to access the DOM (and eventually) alter it before it is actually
displayed?

If I get the DOM document when the "webView:didStartProvisionalLoadForFrame:"
method is called, it's empty because the HTML has not been downloaded yet.

If I get the DOM document when the "webView:didFinishLoadForFrame:" method is
called, the web page is already (partly) displayed and it's too late to modify
the DOM before anything is displayed.

What's the best way to get the DOM as soon as it's available? Is it even
possible?
It is possible to "observe" [frame DOMDocument] and start doing things as soon
as it is not empty?

Thanks,
Martin.


More information about the webkit-dev mailing list