Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Getting target frame from a link



Hi,

I have a question about getting the target frame specified in a HTML link or similar action.

Background:
-----------
Given a web page consisting of several frame and iframe elements I have a link in frame A which has the attribute target="B" set. (Something like <a href="#" target="B">foo</a>.) I handle the link myself by intercepting - webView:decidePolicyForNavigationAction:request:frame:decisionListener: in my delegate. I would like to get the frame (WebFrame*) specified in the target attribue (the frame/iframe named "B") of the link so that I can call loadRequest: on that frame to only reload that part of the web page.


Problem:
--------
When I look at the actionInformation dict received in - webView:decidePolicyForNavigationAction:request:frame:decisionListener: I see that it contains a WebActionElementKey dict which contains WebElementFrame and WebElementTargetFrame. According to common sense and the somwhat sparse documentation I could find, the WebElementTargetFrame should IMHO correspond to the frame designated by the target attribute of the link. But it doesn't! It and WebElementFrame as well as the frame parmeter of the method always seem to point to the frame the link is in, not the one specified in the target attribute.


Questions:
----------
Is this a bug in WebKit or am I doing something wrong or are my expectations wrong? If it is not a bug why are there WebElementFrame and WebElementTargetFrame entries in the dictionary and what is the difference?



I have a couple of ideas how I can work around this problem in my project but it would be much more elegant if I could get the targeted frame directly from WebKit.


Ideas anyone?


Thanks! Mike -- Mike Fischer Softwareentwicklung, EDV-Beratung Schulung, Vertrieb Web: <http://homepage.mac.com/mike_fischer/index.html> Note: I read this list in digest mode! Send me a private copy for faster responses.

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webkitsdk-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webkitsdk-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.