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

View in English Always switch to English

InputEvent:isComposing 属性

基线 2026
最近可用

自 2026年9月 起,此特性已在最新浏览器中得到支持。但在较旧的设备或浏览器中可能无法运行。

InputEvent.isComposing 只读属性返回一个布尔值,表示事件是否是在 compositionstart 之后且在 compositionend 之前触发的。

返回值

一个布尔值。

示例

js
const inputEvent = new InputEvent("syntheticInput", false);
console.log(inputEvent.isComposing); // 返回 false

规范

规范
UI Events
# dom-inputevent-iscomposing

浏览器兼容性

参见