Click on a URL in WebKit
Click on a URL in WebKit
- Subject: Click on a URL in WebKit
- From: malcom <email@hidden>
- Date: Wed, 31 May 2006 11:15:18 +0200
Hi list,
I've created using XSL+CSS+HTML a web page. You can see it here:
http://www.malcom-mac.com/files/webkit_test/prova.html
There are two nodes. If you click on each node a javascript try to
loading an http:// address. However it's not a normal web site. I need
to intercept it to load a particular file on the disk with the given
code (url path is the unique code).
I've tried with this into the target WebKit delegate class.
- (void)webView:(WebView *)sender
decidePolicyForNavigationAction:(NSDictionary *)actionInformation
request:(NSURLRequest *)request frame:(WebFrame *)frame
decisionListener:(id<WebPolicyDecisionListener>)listener; {
NSLog(@"POLICY: .%@. %@",[[request URL] scheme],[[request URL] path]);
if (![[[request URL] scheme] isEqualToString:@"http"])
[listener use];
else {
[listener ignore];
NSLog(@"[%@]",[[request URL] path]);
ANTArtNode *art = [_sGroup getArticleNodeForID: [[request URL] path]];
[self loadArticle: art forGroup: _sGroup];
}
}
However it does not work and nothing will be launched.
Policy nslog returns:
POLICY: .about. (null)
POLICY: .applewebdata.
Why?
Thanks.
malcom
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden