Movatterモバイル変換


[0]ホーム

URL:


MDN Web Docs

CustomEvent

BaselineWidely available

Note: This feature is available inWeb Workers.

TheCustomEvent interface can be used to attach custom data to an event generated by an application.

As an alternative toCustomEvent, you cansubclass theEvent interface to add custom data and behavior.

Note:If used to attempt to communicate between a web extension content script and a web page script, a non-stringdetail property throws with "Permission denied to access property" in Firefox. To avoid this issue clone the object. SeeShare objects with page scripts for more information.

Event CustomEvent

Constructor

CustomEvent()

Creates a newCustomEvent.

Instance properties

This interface inherits properties from its parent,Event.

CustomEvent.detailRead only

Returns any data passed when initializing the event.

Instance methods

Specifications

Specification
DOM
# interface-customevent

Browser compatibility

See also

Help improve MDN

Learn how to contribute.

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp