sendMessage(_:completionHandler:)
Sends a message to the connected web extension.
Declaration
func sendMessage(_ message: Any?, completionHandler: (((any Error)?) -> Void)? = nil)func sendMessage(_ message: Any?) async throwsParameters
- message:
The JSON-serializable message to be sent.
- completionHandler:
An optional block to be invoked after the message is sent, taking an optional error.