1. 面向开发者的 Web 技术
  2. Web API
  3. KeyboardEvent
  4. KeyboardEvent.isComposing

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

View in English Always switch to English

KeyboardEvent.isComposing

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since ⁨2020年1月⁩.

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

语法

var bool = event.isComposing;

示例

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

规范

Specification
UI Events
# dom-keyboardevent-iscomposing

浏览器兼容性

参考

Help improve MDN

Learn how to contribute

This page was last modified on by MDN contributors.

AltStyle によって変換されたページ (->オリジナル) /