This page was translated from English by the community. Learn more and join the MDN Web Docs community.

View in English Always switch to English

BroadcastChannel: messageerror event

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since ⁨2022년 3월⁩.

messageerror 이벤트는 역직렬화할 수 없는 메시지가 채널에 도착할 시, BroadcastChannel 객체에서 발생합니다.

구문

addEventListener() 같은 메서드에서 이벤트 이름을 사용하거나, 이벤트 처리기 속성을 설정하세요.

js
addEventListener("messageerror", (event) => { })
onmessageerror = (event) => { }

이벤트 타입

MessageEvent. Event를 상속합니다.

Event MessageEvent

이벤트 속성

아래 나열된 속성 외에도, 부모 인터페이스인 Event의 속성들을 사용할 수 있습니다.

data 읽기 전용

메시지 발신기가 보낸 데이터.

origin 읽기 전용

메시지 발신기의 출처를 나타내는 문자열.

lastEventId 읽기 전용

이벤트의 고유 ID를 나타내는 문자열.

source 읽기 전용