Mailing Lists: Apple Mailing Lists

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

Re: Getting target frame from a link



Hmm, nevermind.

After I implemented not one but two workarounds and after I downloaded and built WebKit from source and tried it with my app (using the run-webkit-app script) the problem seems to have gone away. I.e. even my app running with the standard 10.4.2 WebKit doesn't show the problem anymore. I can't think of anything I did to cause this but something obviously changed.

I'm still waiting for verification by my customer when testing on a machine that hasn't seen any self-built WebKit. But as I can't see how a version of WebKit built into some subfolder of my home directory could affect the "real" WebKit I expect the problem to be gone for my customer as well. Unless of course there is a preference the new WebKit set to use the proper target in WebElementTargetFrame ;-)

Anyway, I now have three solutions to this problem, which is more than enough.


Mike

Am 19.10.2005 um 03:54 schrieb Mike Fischer:

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.

-- 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
References: 
 >Getting target frame from a link (From: Mike Fischer <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.