Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

message

이 문서는 아직 자원 봉사자들이 한국어로 번역하지 않았습니다. 함께 해서 번역을 마치도록 도와 주세요!

An message event informs the target, a WebSocket, RTCDataConnection or a BroadcastChannel object, that a message has been received.

If the target is a RTCDataConnection, an event handler for this event can be added via the RTCDataConnection.onmessage property.

If the target is a BroadcastChannel, an event handler for this event can be added via the BroadcastChannel.onmessage property.

General info

Interface
MessageEvent
Bubbles
No
Cancelable
No
Target
RTCDataChannelEvent, WebSocket, BroadcastChannel
Default Action
None

Properties

A MessageEvent being an Event, this event also implements these properties.

data Read only
Is a DOMString containing the message received.

Methods

A MessageEvent being an Event, this event also implements these properties.

Specifications

Specification Status Comment
WebRTC 1.0: Real-time Communication Between Browser
The definition of 'message on RTCDataChannel' in that specification.
Working Draft Adds RTCDataChannel as an EventTarget and defines when this event is sent.
WHATWG HTML Living Standard
The definition of 'message on BroadcastChannel' in that specification.
Living Standard Adds BroadcastChannel as an EventTarget and defines when this event is sent.

Browser compatibility

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support (Yes) (Yes) No support (Yes) ?
on BroadcastChannel No support 38 (38) No support No support No support
Feature Android Chrome for Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support ? ? ? No support ? ?
on BroadcastChannel  No support No support 38.0 (38) No support No support No support

See also

  • WebRTC
  • BroadcastChannel API
  • WebSockets

문서 태그 및 공헌자

 이 페이지의 공헌자: teoli
 최종 변경: teoli,