CustomEvent

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.

CustomEvent interface 是應用程式為了任意目的所初始化的事件。

備註: 此功能可在 Web Worker 中使用。

Event CustomEvent

建構式

CustomEvent()

建立一個 CustomEvent

屬性

此介面繼承了其父介面 Event 的屬性。

CustomEvent.initCustomEvent() 已棄用

初始化一個CustomEvent物件。若該事件已經被觸發,則不會進行任何動作。

規格

Specification
DOM
# interface-customevent

瀏覽器兼容性

Report problems with this compatibility data on GitHub
desktopmobileserver
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
Deno
Node.js
CustomEvent
CustomEvent() constructor
detail
initCustomEvent
Deprecated
Available in workers

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
No support
No support
Deprecated. Not for use in new websites.

參見