Instances of the
SafariExtensionMessageEvent encapsulate a message being passed. Message passing is the only way to communicate information from inside the web content area to scripts running outside of it, and vice versa.
The event type for this class is
The name of the message.
readonly attribute DOMString name
There is no fixed meaning to the name of a message; it is up to the programmer to decide how messages should be named within an extension.
The message data.
attribute any message
This attribute is optional; if you don’t need it you can set it to
null, or not set any value.
The data can be any scalar value, or any object that conforms to the W3C standard for safe passing of structured cloned data.