onMessageExternal property
EventStream<OnMessageExternalEvent>
get
onMessageExternal
Fired when a message is sent from another extension/app (by
runtime.sendMessage
). Cannot be used in a content script.
Implementation
EventStream<OnMessageExternalEvent> get onMessageExternal =>
$js.chrome.runtime.onMessageExternal.asStream(($c) => (
JSAny? message,
$js.MessageSender sender,
JSFunction sendResponse,
) {
return $c(OnMessageExternalEvent(
message: message?.dartify(),
sender: MessageSender.fromJS(sender),
sendResponse: sendResponse,
));
});