| Conforms to | |
| Framework | /System/Library/Frameworks/WebKit.framework |
| Availability | Available in Mac OS X v10.2 with Safari 1.0 and later. Available in Mac OS X v10.2.7 and later. |
| Companion guide | |
| Declared in | WebPolicyDelegate.h |
This protocol enables WebView policy delegates to communicate with listener objects. A listener object conforming to this protocol is passed as one of the arguments to web view policy delegate methods.
This protocol allows delegates to handle download decisions asynchronously. For example, the policy delegate may display a sheet, and the listener object gets notified only after the user clicks an OK or Cancel button. You do not directly create objects that conform to this protocol.
– download required method
– ignore required method
– use required method
Tells the listener to download the resource instead of displaying it. (required)
- (void)download
This method converts a location change that may be in progress to a download operation without having to stop and restart the download. You might invoke this method based on the content’s MIME type.
WebPolicyDelegate.hTells the listener to ignore the resource. (required)
- (void)ignore
You might invoke this method to handle the resource request yourself. For example, you might want to open a new window, open a window behind the current window, open a URL in an external application, or show a file URL location in the Finder.
WebPolicyDelegate.hTells the listener to use the resource. (required)
- (void)use
If there are pending policy decisions, the next policy delegate method has the opportunity to decide what to do with the resource. This will be either the next navigation policy delegate (if there is a redirect), or the content policy delegate. If there are no pending policy decisions, the resource will be displayed if possible. If there is no document view available to display the resource, then the webView:unableToImplementPolicyWithError:frame: message will be sent to the web view policy delegate with an appropriate error. Invoking this method creates any new windows needed to handle the resource.
WebPolicyDelegate.hLast updated: 2009-03-04