此页面由社区从英文翻译而来。了解更多并加入 MDN Web Docs 社区。

View in English Always switch to English

KeyboardEvent.isComposing

有限可用

此特性不属于基线,因为它尚未在主流浏览器中得到支持。

KeyboardEvent.isComposing 只读属性,返回一个 Boolean 值,表示该事件是否在 compositionstart 之后和 compositionend 之前被触发。

语法

var bool = event.isComposing;

示例

js
var kbdEvent = new KeyboardEvent("syntheticKey", false);
console.log(kbdEvent.isComposing); // return false

规范

规范
UI Events
# dom-keyboardevent-iscomposing

浏览器兼容性

参考