A WKNavigationAction object contains information about an action that may cause a navigation, used for making policy decisions.


class WKNavigationAction : NSObject


Inspecting Navigation Information

var request: URLRequest

The navigation’s request.

var sourceFrame: WKFrameInfo

The frame requesting the navigation.

var targetFrame: WKFrameInfo?

The target frame, or nil if this is a new window navigation.

Inspecting User Actions

var buttonNumber: Int

The number of the mouse button causing the navigation to be requested.

var modifierFlags: NSEvent.ModifierFlags

The modifier keys that were in effect when the navigation was requested.

var navigationType: WKNavigationType

The type of action that triggered the navigation.


enum WKNavigationType

The type of action triggering a navigation.


Inherits From

Conforms To

See Also


class WKNavigation

A WKNavigation object contains information for tracking the loading progress of a webpage.

class WKNavigationResponse

A WKNavigationResponse object contains information about a navigation response, used for making policy decisions.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software