Instance Method
send(_:using:)
Sends a message using the given handler using the JSON format.
func send(_ message: Message, using evaluateJavaScript: (String, ((Any?, (any Error)?) -> ())?) -> ()) throws
Parameters
messageThe message to send.
evaluateJavaScriptA handler that the communication bridge uses to send the given message, encoded in JSON.
Discussion
Throws
Throws a CommunicationBridgeError.unableToEncodeMessage(_:underlyingError:) if the communication bridge could not encode the given message to JSON.