compositionupdate
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since April 2017.
compositionupdate
事件触发于字符被输入到一段文字的时候(这些可见字符的输入可能需要一连串的键盘操作、语音识别或者点击输入法的备选词)
Bubbles | Yes |
Cancelable | No |
Target objects | Element |
Interface | TouchEvent |
属性
Property | Type | Description |
---|---|---|
target 只读 |
EventTarget |
焦点所在的,处理文字输入的元素。 |
type 只读 |
DOMString |
The type of event. |
bubbles 只读 |
boolean |
Does the event normally bubble? |
cancelable 只读 |
boolean |
Is it possible to cancel the event? |
view 只读 |
WindowProxy |
Document.defaultView (the window of the document). |
detail 只读 |
long (float ) |
0. |
data 只读 |
DOMString (string) |
要被替换掉的字符串,如果输入时没有字符串被选,则为空字符串。只读。 |
locale 只读 |
DOMString (string) |
输入事件的语言代号,或者空字符串。只读。 |
规范
Specification |
---|
UI Events # event-type-compositionupdate |
浏览器兼容性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
compositionupdate event |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
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.