---
title: WKWebExtension.Command
framework: webkit
role: symbol
role_heading: Class
path: webkit/wkwebextension/command
---

# WKWebExtension.Command

An object that encapsulates the properties for an individual web extension command.

## Declaration

```swift
@MainActor class Command
```

## Overview

Overview Provides access to command properties such as a unique identifier, a descriptive title, and shortcut keys. Commands can be used by a web extension to perform specific actions within a web extension context, such toggling features, or interacting with web content. These commands enhance the functionality of the extension by allowing users to invoke actions quickly.

## Topics

### Instance Properties

- [activationKey](webkit/wkwebextension/command/activationkey.md)
- [id](webkit/wkwebextension/command/id.md)
- [keyCommand](webkit/wkwebextension/command/keycommand.md)
- [menuItem](webkit/wkwebextension/command/menuitem.md)
- [modifierFlags](webkit/wkwebextension/command/modifierflags.md)
- [title](webkit/wkwebextension/command/title.md)
- [webExtensionContext](webkit/wkwebextension/command/webextensioncontext.md)

## Relationships

### Inherits From

- [NSObject](objectivec/nsobject-swift.class.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [Sendable](swift/sendable.md)

## See Also

### Classes

- [WKWebExtension.Action](webkit/wkwebextension/action.md)
- [WKWebExtension.DataRecord](webkit/wkwebextension/datarecord.md)
- [WKWebExtension.MatchPattern](webkit/wkwebextension/matchpattern.md)
- [WKWebExtension.MessagePort](webkit/wkwebextension/messageport.md)
- [WKWebExtension.TabConfiguration](webkit/wkwebextension/tabconfiguration.md)
- [WKWebExtension.WindowConfiguration](webkit/wkwebextension/windowconfiguration.md)
- [WKWebExtensionController.Configuration](webkit/wkwebextensioncontroller/configuration-swift.class.md)
