OnRequestEvent class
Deprecated: please use onMessage.
class OnRequestEvent { /** * The request sent by the calling script. * `optional` * * The request sent by the calling script. */ final dynamic request; final MessageSender sender; /** * Function to call (at most once) when you have a response. The argument * should be any JSON-ifiable object, or undefined if there is no response. If * you have more than one `onRequest` listener in the same document, then only * one may send a response. */ final dynamic sendResponse; OnRequestEvent(this.request, this.sender, this.sendResponse); }
Constructors
new OnRequestEvent(request, MessageSender sender, sendResponse) #
Creates a new Object
instance.
Object
instances have no meaningful state, and are only useful
through their identity. An Object
instance is equal to itself
only.
docs inherited from Object
OnRequestEvent(this.request, this.sender, this.sendResponse);
Properties
final request #
The request sent by the calling script.
optional
The request sent by the calling script.
final dynamic request
final MessageSender sender #
final MessageSender sender
final sendResponse #
Function to call (at most once) when you have a response. The argument
should be any JSON-ifiable object, or undefined if there is no response. If
you have more than one onRequest
listener in the same document, then only
one may send a response.
final dynamic sendResponse