onMessage property
Stream<MessageEvent>
get
onMessage
An event handler fired whenever a message event occurs — when incoming messages are received to the ServiceWorkerContainer object (e.g. via a MessagePort.postMessage() call.)
Implementation
Stream<MessageEvent> get onMessage => _onMessage ??=
callbackToStream(_delegate, 'onmessage', (Object j) => j as MessageEvent);