webExtensionController(_:focusedWindowFor:)
Called when an extension context requests the currently focused window.
Declaration
optional func webExtensionController(_ controller: WKWebExtensionController, focusedWindowFor extensionContext: WKWebExtensionContext) -> (any WKWebExtensionWindow)?Parameters
- controller:
The web extension controller that is managing the extension.
- extensionContext:
The context in which the web extension is running.
Discussion
This method can be optionally implemented by the app to designate the window currently in focus to the extension.
If not implemented, the first window in the result of webExtensionController(_:openWindowsFor:) is used.