WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
35168
Please add WebFrameLoadDelegate callback for "didReceiveHead"
https://bugs.webkit.org/show_bug.cgi?id=35168
Summary
Please add WebFrameLoadDelegate callback for "didReceiveHead"
Dan Wood
Reported
2010-02-19 11:52:39 PST
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.
Attachments
Add attachment
proposed patch, testcase, etc.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug