decidePolicy(for:preferences:)
Determines permission to navigate to new content based on the specified preferences and action information.
Declaration
@MainActor mutating func decidePolicy(for action: WebPage.NavigationAction, preferences: inout WebPage.NavigationPreferences) async -> WKNavigationActionPolicyParameters
- action:
Details about the action that triggered the navigation request.
- preferences:
The preferences to use when displaying the new webpage.
Return Value
The navigation policy for the action.
Discussion
The web page calls this method after the interaction occurs but before it attempts to load any content.