setReaderModeActive(_:for:completionHandler:)
Called to set the reader mode for the tab.
Declaration
optional func setReaderModeActive(_ active: Bool, for context: WKWebExtensionContext, completionHandler: @escaping ((any Error)?) -> Void)optional func setReaderModeActive(_ active: Bool, for context: WKWebExtensionContext) async throwsParameters
- active:
A boolean value indicating whether to activate reader mode.
- 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
No action is performed if not implemented.