Instance Method

messageReceived(withName:from:userInfo:)

Called when a message is received from an injected script.

Declaration

optional func messageReceived(withName messageName: String, from page: SFSafariPage, userInfo: [String : Any]? = nil)

Parameters

messageName

A string that identifies the message.

page

The page that sent the message.

userInfo

Optional message content. If specified, the dictionary's value objects conform to the W3C standard for safe passing of structured data, such as Boolean objects, numeric values, strings, and arrays.

See Also

Receiving Messages in Your App Extension

func messageReceivedFromContainingApp(withName: String, userInfo: [String : Any]?)

Called when a message is received from the extension's containing app.