KeyboardEvent: isComposing 屬性

Baseline 已廣泛支援

此特性已相當成熟,可在許多裝置和瀏覽器版本上使用。自 ⁨2020 年 1 月⁩ 起,所有主流瀏覽器均已支援。

KeyboardEvent.isComposing 只讀屬性返回一個布林值,指示事件是否在組合輸入會話中觸發,即在 compositionstart 事件之後和 compositionend 事件之前。

布林值。

示例

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

規範

規範
UI 事件
# dom-keyboardevent-iscomposing

瀏覽器相容性

另見