Contents

activate(for:completionHandler:)

Called to activate the tab, making it frontmost.

Declaration

optional func activate(for context: WKWebExtensionContext, completionHandler: @escaping ((any Error)?) -> Void)
optional func activate(for context: WKWebExtensionContext) async throws

Parameters

  • context:

    The context in which the web extension is running.

  • completionHandler:

    A block that must be called upon completion. It takes a single error argument, which should be provided if any errors occurred.

Discussion

Upon activation, the tab should become the frontmost and either be the sole selected tab or be included among the selected tabs. No action is performed if not implemented.

See Also

Related Documentation