---
title: "performCommand(_:)"
framework: webkit
role: symbol
role_heading: Instance Method
path: "webkit/wkwebextensioncontext/performcommand(_:)"
---

# performCommand(_:)

Performs the specified command, triggering events specific to this extension.

## Declaration

```swift
func performCommand(_ command: WKWebExtension.Command)
```

## Parameters

- `command`: The command to be performed.

## Discussion

Discussion This method performs the given command as if it was triggered by a user gesture within the context of the focused window and active tab.
