<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.10.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "WebKit",
  "identifier" : "/documentation/WebKit/WKNavigationAction",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "WebKit"
    ],
    "preciseIdentifier" : "c:objc(cs)WKNavigationAction"
  },
  "title" : "WKNavigationAction"
}
-->

# WKNavigationAction

An object that contains information about an action that causes navigation to occur.

```
@MainActor class WKNavigationAction
```

## Overview

Use a [`WKNavigationAction`](/documentation/WebKit/WKNavigationAction) object to make policy decisions about whether to allow navigation within your app’s web view. You don’t create [`WKNavigationAction`](/documentation/WebKit/WKNavigationAction) objects directly. Instead, the web view creates them and delivers them to the appropriate delegate objects. Use the methods of your delegate to analyze the action and determine whether to allow the resulting navigation to occur.

## Topics

### Getting the navigation type

[`navigationType`](/documentation/WebKit/WKNavigationAction/navigationType)

The type of action that triggered the navigation.

[`WKNavigationType`](/documentation/WebKit/WKNavigationType)

The type of action that triggered the navigation.

### Inspecting navigation information

[`request`](/documentation/WebKit/WKNavigationAction/request)

The URL request object associated with the navigation action.

[`sourceFrame`](/documentation/WebKit/WKNavigationAction/sourceFrame)

The frame that requested the navigation.

[`targetFrame`](/documentation/WebKit/WKNavigationAction/targetFrame)

The frame in which to display the new content.

[`shouldPerformDownload`](/documentation/WebKit/WKNavigationAction/shouldPerformDownload)

A Boolean value that indicates whether the web content provided an attribute that indicates a download.

### Inspecting user actions

[`buttonNumber`](/documentation/WebKit/WKNavigationAction/buttonNumber)

The number of the mouse button that caused the navigation request.

[`modifierFlags`](/documentation/WebKit/WKNavigationAction/modifierFlags)

The modifier keys that were pressed at the time of the navigation request.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)