--- title: InputEvent.isComposing slug: Web/API/InputEvent/isComposing translation_of: Web/API/InputEvent/isComposing ---

{{APIRef("DOM Events")}}

The InputEvent.isComposing read-only property returns a {{jsxref("Boolean")}} value indicating if the event is fired after {{event("compositionstart")}} and before {{event("compositionend")}}.

这是一个只读属性,返回boolean类型。表示正处于输入事件的开始与结束之间,表示正在输入状态。

Syntax

var bool = event.isComposing;

Example

var inputEvent = new InputEvent("syntheticInput", false);
console.log(inputEvent.isComposing); // return false

Specifications

Specification Status Comment
{{SpecName('DOM3 Events','#widl-InputEvent-isComposing','InputEvent.isComposing')}} {{Spec2('DOM3 Events')}} Initial definition.

Browser compatibility

{{ CompatibilityTable() }}

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support {{ CompatNo() }} {{ CompatGeckoDesktop("31.0") }} {{ CompatNo() }} {{ CompatNo() }} {{ CompatNo() }}
Feature Android Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
Basic support {{ CompatNo() }} {{ CompatGeckoMobile("31.0") }} {{ CompatNo() }} {{ CompatNo() }} {{ CompatNo() }}

See also