* Enables IME composition handling. * Dynamically loads the InputComposition feature and sets up event listeners. * @private
()
| 2068 | * @private |
| 2069 | */ |
| 2070 | _enableComposition() { |
| 2071 | if (this._composition) { |
| 2072 | return; |
| 2073 | } |
| 2074 | |
| 2075 | const setup = (InputCompositionClass: typeof InputComposition) => { |
| 2076 | this._composition = new InputCompositionClass({ |
| 2077 | getInputEl: () => this._innerInput, |
| 2078 | updateCompositionState: (isComposing: boolean) => { |
| 2079 | this._isComposing = isComposing; |
| 2080 | }, |
| 2081 | }); |
| 2082 | this._composition.addEventListeners(); |
| 2083 | }; |
| 2084 | |
| 2085 | if (MultiComboBox.composition) { |
| 2086 | setup(MultiComboBox.composition); |
| 2087 | } else { |
| 2088 | import("./features/InputComposition.js").then(CompositionModule => { |
| 2089 | MultiComboBox.composition = CompositionModule.default; |
| 2090 | setup(CompositionModule.default); |
| 2091 | }); |
| 2092 | } |
| 2093 | } |
| 2094 | |
| 2095 | get editable() { |
| 2096 | return !this.readonly; |