Initializer
init(with:onReceiveMessage:)
Creates a communication bridge configured with the given controller to receive messages.
init(with contentController: WKUserContentController? = nil, onReceiveMessage: ((Message) -> ())? = nil)
Parameters
contentControllerThe controller that receives messages. Set to nil if you need the communication bridge to ignore received messages.
onReceiveMessageThe handler that the communication bridge calls when it receives a message. Set to nil if you need the communication bridge to ignore received messages.