--- title: KeyboardEvent.isComposing slug: Web/API/KeyboardEvent/isComposing tags: - API - DOM - KeyboardEvent - events - 键盘事件 translation_of: Web/API/KeyboardEvent/isComposing ---
{{APIRef("DOM Events")}}
KeyboardEvent.isComposing
只读属性,返回一个 {{jsxref("Boolean")}} 值,表示该事件是否在 {{event("compositionstart")}} 之后和 {{event("compositionend")}} 之前被触发。
var bool = event.isComposing;
var kbdEvent = new KeyboardEvent("syntheticKey", false); console.log(kbdEvent.isComposing); // return false
Specification | Status | Comment |
---|---|---|
{{SpecName('DOM3 Events','#widl-KeyboardEvent-isComposing','KeyboardEvent.isComposing')}} | {{Spec2('DOM3 Events')}} | Initial definition. |
{{ CompatibilityTable() }}
特性 | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
---|---|---|---|---|---|
基本支持 | {{ CompatChrome(56.0) }} | {{ CompatGeckoDesktop("31.0") }} | {{ CompatNo() }} | {{ CompatOpera(43) }} | {{ CompatNo() }} |
特性 | Android Webview | Firefox Mobile (Gecko) | IE Phone | Opera Mobile | Safari Mobile | Chrome for Android |
---|---|---|---|---|---|---|
基本支持 | {{ CompatChrome(56.0) }} | {{ CompatGeckoMobile("31.0") }} | {{ CompatNo() }} | {{ CompatOperaMobile(43) }} | {{ CompatNo() }} | {{ CompatChrome(56.0) }} |