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 | Status | Comment |
---|---|---|
InputDeviceCapabilities | Draft | Added sourceCapabilities property. |
Document Object Model (DOM) Level 3 Events Specification UIEvent() |
Obsolete | Initial definition. |
浏览器兼容性
BCD tables only load in the browser
See also
UIEvent
, the interface of the objects it constructs.