Class

WKScriptMessage

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

Declaration

class WKScriptMessage : NSObject

Topics

Inspecting Message Information

var body: Any

The body of the message.

var frameInfo: WKFrameInfo

The frame sending the message.

var name: String

The name of the message handler to which the message is sent.

var webView: WKWebView?

The web view sending the message.

Relationships

Inherits From

Conforms To

See Also

Scripts

class WKUserContentController

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

class WKUserScript

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

protocol WKScriptMessageHandler

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