---
title: "decidePolicy(for:preferences:)"
framework: webkit
role: symbol
role_heading: Instance Method
path: "webkit/webpage/navigationdeciding/decidepolicy(for:preferences:)"
---

# decidePolicy(for:preferences:)

Determines permission to navigate to new content based on the specified preferences and action information.

## Declaration

```swift
@MainActor mutating func decidePolicy(for action: WebPage.NavigationAction, preferences: inout WebPage.NavigationPreferences) async -> WKNavigationActionPolicy
```

## Parameters

- `action`: Details about the action that triggered the navigation request.
- `preferences`: The preferences to use when displaying the new webpage.

## Return Value

Return Value The navigation policy for the action.

## Discussion

Discussion The web page calls this method after the interaction occurs but before it attempts to load any content.
