onUserScriptMessage property
EventStream<OnUserScriptMessageEvent>
get
onUserScriptMessage
Fired when a message is sent from a user script associated with the same extension.
Implementation
EventStream<OnUserScriptMessageEvent> get onUserScriptMessage =>
$js.chrome.runtime.onUserScriptMessage.asStream(($c) => (
JSAny? message,
$js.MessageSender sender,
JSFunction sendResponse,
) {
return $c(OnUserScriptMessageEvent(
message: message?.dartify(),
sender: MessageSender.fromJS(sender),
sendResponse: sendResponse,
));
}.toJS);