Protocol

WKScriptMessageHandler

A class conforming to the WKScriptMessageHandler protocol provides a method for receiving messages from JavaScript running in a webpage.

Declaration

@protocol WKScriptMessageHandler

Topics

Receiving Messages

userContentController:didReceiveScriptMessage:

Invoked when a script message is received from a webpage.

Required.

Relationships

Inherits From

See Also

Scripts

WKUserContentController

A WKUserContentController object provides a way for JavaScript to post messages and inject user scripts to a web view.

WKScriptMessage

A WKScriptMessage object contains information about a message sent from a webpage.

WKUserScript

A WKUserScript object represents a script that can be injected into a webpage.