WebAppMessageHandling

public protocol WebAppMessageHandling

Add conformance to this protocol if your WebApp would like to listen to calls to webkit.messageHandlers[name].postMessage().

  • You must enumerate the names of the messages you want to receive.

    Declaration

    Swift

    var supportedMessageNames: [String] { get }
  • The web page has called messageHandlers[name].postMessage(body)

    Declaration

    Swift

    func handleMessage(name: String, _ body: AnyObject) -> Bool