message
메시지 이벤트는 메시지가 수신되었음을 알리는 메시지, WebSocket
, RTCDataConnection
또는 BroadcastChannel
개체를 알려 줍니다.
대상이 RTCDataConnection
, 인 경우 이 이벤트에 대한 이벤트 핸들러를 RTCDataConnection.onmessage
속성을 통해 추가할 수 있습니다.
대상이 BroadcastChannel
인 경우, 이 이벤트에 대한 이벤트 핸들러를 BroadcastChannel.onmessage
(en-US) 속성을 통해 추가할 수 있습니다.
일반 정보
- 인터페이스
MessageEvent
- Bubbles
- No
- Cancelable
- No
- Target
RTCDataChannelEvent
,WebSocket
,BroadcastChannel
- Default Action
- None
특성
Event
가 진행되는 동안 MessageEvent
이러한 속성을 구현합니다.
data
Read only- 수신된 메시지를 포함하는
DOMString
가 있습니다.
방법
Event
가 진행되는 동안 MessageEvent
이러한 속성을 구현합니다.
관련 자료
사양
사양 | 상황 | Comment |
---|---|---|
WebRTC 1.0: Real-time Communication Between Browsers The definition of 'message on RTCDataChannel' in that specification. |
Candidate Recommendation | RTCDataChannel (en-US) 를 EventTarget 로 추가하고 이 이벤트가 전송될 시기를 정의합니다. |
HTML Living Standard The definition of 'message on BroadcastChannel' in that specification. |
Living Standard | RTCDataChannel (en-US) 를 EventTarget 로 추가하고 이 이벤트가 전송될 시기를 정의합니다. |
브라우저 호환성
We're converting our compatibility data into a machine-readable JSON format.
This compatibility table still uses the old format,
because we haven't yet converted the data it contains.
Find out how you can help!
Feature | Chrome | Edge | Firefox (Gecko) | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|---|
Basic support | (Yes) | (Yes) | (Yes) | No support | (Yes) | ? |
on BroadcastChannel |
No support | No support | 38 (38) | No support | No support | No support |
Feature | Android | Chrome for Android | Edge | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|---|---|
Basic support | ? | ? | (Yes) | ? | No support | ? | ? |
on BroadcastChannel |
No support | No support | No support | 38.0 (38) | No support | No support | No support |
보기
- WebRTC
- BroadcastChannel API
- WebSockets