origin (MessageEvent)

MessageEvent (DOM)

[13] MessageEvent は、サーバーや他の起源からメッセージを受信した時のイベントで使われるイベントインターフェイスです。

仕様書

インターフェイス

[27] 文書環境ワーカー環境AudioWorklet晒されています >>12

コンストラクター

[15] イベントコンストラクターを持ちます >>12

メンバー

[14] MessageEvent インターフェイスは、 Event インターフェイスメンバーに加えて、 次のメンバーを持ちます。 MessageEventInit 辞書MessageEventInit 辞書メンバーに加えて、 次のメンバーを持ちます。

[16] MessageEvent インターフェイスは、更に次のメンバーを持ちます。

[11] MessageEvent インターフェイスは、色々なイベントに使われます。 IDL属性は、各用途で次のような値に設定されます。

x
場面
target
イベント対象
t
イベント型
d
data
o
origin
l
lastEventId
s
source
p
ports
target
EventSource
x
SSE のデータ受信
t
message
d
受信したデータ
o
接続先サーバーの起源
l
target
WebSocket
x
WebSocketメッセージ受信
t
message
d
受信したデータ
o
接続先サーバーの起源
target
Window
x
WindowpostMessage 受信
t
message
d
受信したデータ
o
送信元の起源
p
s
target
Window
x
WindowpostMessage 受信 (エラー)
t
messageerror
o
送信元の起源
s
d
空文字列
target
MessagePort
x
MessagePortpostMessage 受信
t
message
d
受信したデータ
p
target
MessagePort
x
MessagePortpostMessage 受信 (エラー)
t
messageerror
d
空文字列
target
BroadcastChannel
x
BroadcastChannelpostMessage 受信
t
message
d
受信したデータ
o
送信元の起源
target
BroadcastChannel
x
BroadcastChannelpostMessage 受信 (エラー)
t
messageerror
d
空文字列
o
送信元の起源
target
SharedWorkerGlobalScope
x
共有ワーカーへの SharedWorker 接続を検知
t
connect
d
空文字列
p
s

MessageEvent インターフェイス data 属性

[19] MessageEvent インターフェイスMessageEventInit 辞書data IDL属性/辞書メンバー >>12 は、 受信したデータを表します。

[20] 値は任意のものです >>12辞書での既定値は null です >>12

MessageEvent インターフェイス source 属性

[21] MessageEvent インターフェイスMessageEventInit 辞書source IDL属性/辞書メンバー >>12 は、 データの送信者を表します。

[22] 値は MessageEventSource または null です >>12辞書における既定値は null です。

[18] MessageEventSource は、 次のいずれかを表す型定義されています >>12

MessageEvent インターフェイス origin 属性

[21] MessageEvent インターフェイスMessageEventInit 辞書origin IDL属性/辞書メンバー >>12 は、 データの送信者の起源を表します。

[22] 値は USVString です >>12辞書における既定値は空文字列です >>12

[23] 起源直列化が設定されるか、空文字列が設定されます。

歴史

[1] Web Applications 1.0 r8455 Make WebSocket binary data ArrayBuffers mutable, for consistency with XHR. ( ( 版)) http://html5.org/tools/web-apps-tracker?from=8454&to=8455

[2] Web Applications 1.0 r8589 Instead of MessageEvent.channel, use MessageEvent.target.name. ( ( 版)) http://html5.org/tools/web-apps-tracker?from=8588&to=8589

[3] Re: [whatwg] MessageEvent and ports (Jonas Sicking 著, 版) https://lists.w3.org/Archives/Public/public-whatwg-archive/2015Mar/0008.html

[4] Write structured clone algorithm in terms of ECMAScript · whatwg/html@bfb960c ( 版) https://github.com/whatwg/html/commit/bfb960c938580c95e77365e614218b952f96375b

[5] Editorial: define Event attribute defaults through IDL · whatwg/html@0be0229 ( 版) https://github.com/whatwg/html/commit/0be02299f128cbb7c65a7ce259fdd838fd44a4b5

[6] Use FrozenArray for Navigator#languages and MessageEvent#ports · whatwg/html@e4df68a ( 版) https://github.com/whatwg/html/commit/e4df68a41b86753c7fcdd0d8ea4615f63ffc87e9

[7] Make MessageEvent's ports attribute non-nullable (cdumez著, ) https://github.com/whatwg/html/commit/df2c0c448612d5b8ab85ad3c6ce0255ee11c0b01

[8] Specify the realm for the SSE MessageEvent (domenic著, ) https://github.com/whatwg/html/commit/91d19d647433203f1f319e2afe76e63ceae646ca

[9] Enable MessageEvent to supplant ServiceWorkerMessageEvent (annevk著, ) https://github.com/whatwg/html/commit/8dd63c05ddd950b28b58bdb9767724afd77e092f

[10] Add ServiceWorkerContainer target to MessageEvent (jungkees著, ) https://github.com/whatwg/html/commit/6531e0982385de7f21b9a585dd53ad3bfc731043

[17] Enable MessageEvent to supplant ServiceWorkerMessageEvent (annevk著, ) https://github.com/whatwg/html/commit/8dd63c05ddd950b28b58bdb9767724afd77e092f

[24] Define messageerror (annevk著, ) https://github.com/whatwg/html/commit/25a94f606e983534a863a0559d65bd29bb940a02

[25] Remove Unicode serialization of an origin (annevk著, ) https://github.com/whatwg/html/commit/59ebd9c094d9d532458a9ee61f307bf41bc70811

[26] Expose MessagePort to AudioWorklet (hoch著, ) https://github.com/whatwg/html/commit/458347c0d677dbd6e2414d6f435c77fbb9c9eab1

[28] Expose MessagePort to AudioWorklet · Issue #3081 · whatwg/html () https://github.com/whatwg/html/issues/3081

[29] Fix 3081: Expose MessagePort in AudioWorklet by hoch · Pull Request #3082 · whatwg/html () https://github.com/whatwg/html/pull/3082

[30] 22646 – So if we want to say on a per-object basis whether it ought to be exposed to workers (which I think is useful) lets introduce "exposed to document environments", "exposed to worker environments", and [...] () https://www.w3.org/Bugs/Public/show_bug.cgi?id=22646

[31] Use ASCII serialization for origins (#1151) (jungkees著, ) https://github.com/w3c/ServiceWorker/commit/a47c6d86c1436a4fff573d2a5da92b0e14891fa2

[32] Use ASCII serialization for origins by jungkees · Pull Request #1151 · w3c/ServiceWorker () https://github.com/w3c/ServiceWorker/pull/1151

[33] Use ASCII serialization for origins · Issue #1142 · w3c/ServiceWorker () https://github.com/w3c/ServiceWorker/issues/1142