onMessage property
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
@override
Stream<MessageEvent> get onMessage => _onMessage ??=
callbackToStream(_delegate, 'onmessage', (Object j) => j as MessageEvent);