KeyboardEvent: thuộc tính isComposing

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since January 2020.

Thuộc tính chỉ đọc KeyboardEvent.isComposing trả về một giá trị boolean cho biết sự kiện có được kích hoạt trong một phiên soạn thảo hay không, tức là, sau compositionstart và trước compositionend.

Giá trị

Một boolean.

Ví dụ

js
const kbdEvent = new KeyboardEvent("syntheticKey", false);
console.log(kbdEvent.isComposing); // trả về false

Đặc điểm kỹ thuật

Specification
UI Events
# dom-keyboardevent-iscomposing

Tương thích trình duyệt

Xem thêm