Definition
HTML Standard defines MessagePort
[Exposed=(Window,Worker,AudioWorklet), Transferable]
interface MessagePort : EventTarget {
undefined postMessage(any message, sequence<object> transfer);
undefined postMessage(any message, optional StructuredSerializeOptions options = {});
undefined start();
undefined close();
// event handlers
attribute EventHandler onmessage;
attribute EventHandler onmessageerror;
attribute EventHandler onclose;
};
Methods and attributes that return objects implementing MessagePort
Referring IDL interfaces/dictionaries
Referring specifications
- Service Workers Nightly refers to
MessagePort
- Web Audio API 1.1 refers to
MessagePort