UIEvent()

UIEvent() constructor 是用來建立新的 UIEvent

語法

 event = new UIEvent(typeArg, UIEventInit);

參數

typeArg

一個 DOMString ,用來表示事件名稱

UIEventInit選擇性

一個 UIEventInit dictionary ,能接受以下參數:

detail

定義事件意義的值(類型:long,默認值:0)。關於事件的意義於 UIEvent.detail 已有較詳盡的列表。

view

與事件相關的 Window,默認值:null

規格

Specification
UI Events
# dom-uievent-uievent

瀏覽器支援度

BCD tables only load in the browser

延伸閱讀

  • UIEvent,此 constructer 所建立的 object 的 interface。