webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
Instance Methods | List of all members
<WebPolicyDelegate > Protocol Reference

#import <WebPolicyDelegate.h>

Inheritance diagram for <WebPolicyDelegate >:

Instance Methods

(void- webView:decidePolicyForNavigationAction:request:frame:decisionListener:
 
(void- webView:decidePolicyForNewWindowAction:request:newFrameName:decisionListener:
 
(void- webView:decidePolicyForMIMEType:request:frame:decisionListener:
 
(void- webView:unableToImplementPolicyWithError:frame:
 

Method Documentation

◆ webView:decidePolicyForMIMEType:request:frame:decisionListener:()

- (void WebPolicyDelegate) webView: (WebView *)  webView
decidePolicyForMIMEType: (NSString *)  type
request: (NSURLRequest *)  request
frame: (WebFrame *)  frame
decisionListener: (id< WebPolicyDecisionListener >)  listener 
optional

webView:decidePolicyForMIMEType:request:frame: Returns the policy for content which has been partially loaded. Sent after webView:didStartProvisionalLoadForFrame: is sent on the WebFrameLoadDelegate.

Parameters
typeMIME type for the resource.
requestA NSURLRequest for the partially loaded content.
frameThe frame which is loading the URL.
listenerThe object to call when the decision is made

◆ webView:decidePolicyForNavigationAction:request:frame:decisionListener:()

- (void WebPolicyDelegate) webView: (WebView *)  webView
decidePolicyForNavigationAction: (NSDictionary *)  actionInformation
request: (NSURLRequest *)  request
frame: (WebFrame *)  frame
decisionListener: (id< WebPolicyDecisionListener >)  listener 
optional

webView:decidePolicyForNavigationAction:request:frame:decisionListener: This method is called to decide what to do with a proposed navigation.

Parameters
actionInformationDictionary that describes the action that triggered this navigation.
requestThe request for the proposed navigation
frameThe WebFrame in which the navigation is happening
listenerThe object to call when the decision is made This method will be called before loading starts, and on every redirect.

◆ webView:decidePolicyForNewWindowAction:request:newFrameName:decisionListener:()

- (void WebPolicyDelegate) webView: (WebView *)  webView
decidePolicyForNewWindowAction: (NSDictionary *)  actionInformation
request: (NSURLRequest *)  request
newFrameName: (NSString *)  frameName
decisionListener: (id< WebPolicyDecisionListener >)  listener 
optional

webView:decidePolicyForNewWindowAction:request:newFrameName:decisionListener: This method is called to decide what to do with an targetted nagivation that would open a new window.

Parameters
actionInformationDictionary that describes the action that triggered this navigation.
requestThe request for the proposed navigation
frameNameThe frame in which the navigation is taking place
listenerThe object to call when the decision is made This method is provided so that modified clicks on a targetted link which opens a new frame can prevent the new window from being opened if they decide to do something else, like download or present the new frame in a specialized way.

If this method picks a policy of Use, the new window will be opened, and decidePolicyForNavigationAction:request:frame:decisionListner: will be called with a WebNavigationType of WebNavigationTypeOther in its action. This is to avoid possible confusion about the modifiers.

◆ webView:unableToImplementPolicyWithError:frame:()

- (void WebPolicyDelegate) webView: (WebView *)  webView
unableToImplementPolicyWithError: (NSError *)  error
frame: (WebFrame *)  frame 
optional

webView:unableToImplementPolicy:error:forURL:inFrame: Called when a WebPolicy could not be implemented. It is up to the client to display appropriate feedback.

Parameters
errorThe error that caused the policy to not be implemented.
frameThe frame in which the policy could not be implemented.

The documentation for this protocol was generated from the following file: