Join MDN and developers like you at Mozilla's View Source conference, 12-14 September in Berlin, Germany. Learn more at https://viewsourceconf.org

UIEvent

 UIEvent 代表简单的用户界面事件.

方法概述

void initUIEvent(in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in views::AbstractView viewArg, in long detailArg);

属性

Attribute Type Description
detail long 事件的详细介绍,根据事件类型不同而不同. 只读.
view views::AbstractView 生成该事件的视图. 只读.

方法

initUIEvent

初始化一个UIEvent对象.

void initUIEvent(
  in DOMString typeArg,
  in boolean canBubbleArg,
  in boolean cancelableArg,
  in views::AbstractView viewArg,
  in long detailArg
);
参数
typeArg
UI event类型.
canBubbleArg
事件是否冒泡.
cancelableArg
事件是否可以取消.
viewArg
指定view 属性值. 可以是 null.
detailArg
指定detail 属性值.

规范

DOM 3 Events: UIEvent

浏览器兼容性

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support ? (Yes) ? ? ?
Feature Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support ? (Yes) ? ? ?

相关链接

wiki.languages({
  "en": "en/DOM/UIEvent"
});

文档标签和贡献者

 此页面的贡献者: teoli, ziyunfei
 最后编辑者: teoli,