Trait WebPolicyDelegate

Source
pub unsafe trait WebPolicyDelegate: NSObjectProtocol { }
👎Deprecated
Available on crate feature WebPolicyDelegate only.
Expand description

While loading a URL, WebKit asks the WebPolicyDelegate for policies that determine the action of what to do with the URL or the data that the URL represents. Typically, the policy handler methods are called in this order:

decidePolicyForNewWindowAction:request:newFrameName:decisionListener: (at most once) <BR

decidePolicyForNavigationAction:request:frame:decisionListener: (zero or more times) <BR

decidePolicyForMIMEType:request:frame: (zero or more times) <BR

New window policy is always checked. Navigation policy is checked for the initial load and every redirect unless blocked by an earlier policy. Content policy is checked once the content type is known, unless an earlier policy prevented it.

In rare cases, content policy might be checked more than once. This occurs when loading a “multipart/x-mixed-replace” document, also known as “server push”. In this case, multiple documents come in one navigation, with each replacing the last. In this case, conent policy will be checked for each one.

See also Apple’s documentation

Trait Implementations§

Source§

impl ProtocolType for dyn WebPolicyDelegate

Source§

const NAME: &'static str = "WebPolicyDelegate"

The name of the Objective-C protocol that this type represents. Read more
Source§

fn protocol() -> Option<&'static AnyProtocol>

Get a reference to the Objective-C protocol object that this type represents. Read more
Source§

impl<T> ImplementedBy<T> for dyn WebPolicyDelegate

Implementations on Foreign Types§

Source§

impl<T> WebPolicyDelegate for ProtocolObject<T>

Implementors§