[Webkit-unassigned] [Bug 35168] New: Please add WebFrameLoadDelegate callback for "didReceiveHead"
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Feb 19 11:52:39 PST 2010
https://bugs.webkit.org/show_bug.cgi?id=35168
Summary: Please add WebFrameLoadDelegate callback for
"didReceiveHead"
Product: WebKit
Version: 528+ (Nightly build)
Platform: All
OS/Version: Mac OS X 10.6
Status: NEW
Severity: Enhancement
Priority: P3
Component: New Bugs
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: dwood at karelia.com
I am finding that it would be useful to get a callback in my
WebFrameLoadDelegate when the <head> element of a page has been loaded, so I
can examine the various head elements (language, meta tags, scripts, etc.) as
soon as possible.
We have a very handy callback webView:didReceiveTitle:forFrame: and a similar
one for the icon, but these are too specialized. It would be very useful to
just have a general notification of the entire <head> being loaded. I could
then inspect the DOM for the pieces I need.
I have two suggestions for what this callback could look like. A simpler API
would be one that just requires you to fetch the DOMDocument for the frame, so
the API might look like this:
- (void)webView:(WebView *)sender didReceiveHeadForFrame:(WebFrame *)frame
Or, since the obvious thing you will need once you have received the head is to
do some checking of the Head DOMNode, the API might look like this:
- (void)webView:(WebView *)sender didReceiveHead:(DOMNode *)headNode
forFrame:(WebFrame *)frame
However, in practice, it might not be that useful to give us the head, since
the client might actually want to invoke something like [[frame DOMDocument]
getElementsByTagName:@"meta"] right away, and won't really care about the
DOMNode of the head that got passed to it.
So I would vote for the first, simpler API.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list