UIEvent()
UIEvent()
作为构造函数,可用于构造一个新的 UIEvent
对象。
语法
event = new UIEvent(typeArg [, UIEventInit])
Values
typeArg
-
传递的是一个
DOMString
类型的字符串,用来命名且重新发布的事件。 UIEventInit
可选-
是
UIEventInit
集合,它拥有以下属性:detail
: 可选,默认为 long 类型的 0 数值,用来标记事件的关联值。UIEvent.detail
列出了标准事件的语义。view
: 可选,默认为 null,类型为WindowProxy
, 用来关联Window
与 event 本身。sourceCapabilities
: 非标准 一个InputDeviceCapabilities
(en-US) 类型的接口实例 (对象),用来提供物理设备的触摸信息。
备注:
UIEventInit
合集依然接受从EventInit
定义来的合集。
Specifications
Specification |
---|
UI Events # dom-uievent-uievent |
浏览器兼容性
BCD tables only load in the browser
See also
UIEvent
, the interface of the objects it constructs.