CompositionEvent() 构造函数创建新 CompositionEvent 对象实例。

句法

const myEvent = new CompositionEvent(typeArg [, CompositionEventInit])
					

typeArg
DOMString 表示事件的名称。
CompositionEventInit 可选

A CompositionEventInit dictionary object, which can contain the following members:

data
初始化 data 属性在 CompositionEvent object to the characters generated by the IME composition.

注意 CompositionEventInit dictionary inherits from the UIEventInit dictionary, so can also accept members defined on there.

规范

规范 状态 注释
DOM (文档对象模型) 3 级事件规范
The definition of 'CompositionEvent()' in that specification.
过时 初始定义。

浏览器兼容性

The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. 更新 GitHub 上的兼容性数据
桌面 移动
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
CompositionEvent() 构造函数 Chrome Yes Edge 12 Firefox 53 IE Yes Opera 不支持 No Safari ? WebView Android Yes Chrome Android Yes Firefox Android 53 Opera Android ? Safari iOS ? Samsung Internet Android Yes

图例

完整支持

完整支持

不支持

不支持

兼容性未知 ?

兼容性未知

另请参阅

元数据

  • 最后修改: