how to listen to changes with IME support

with codemirror 6, I can listen to changes like this:

this.edit = new EditorView({
  state: EditorState.create({
    extensions: [ 
      EditorView.updateListener.of((v:ViewUpdate) => {
        if (v.docChanged) {
          // Document changed
    }) ]
  parent: this.element

But with IME input, I only want to trigger change when composition end。like vue v-model

I tried composing,but the value is also true when composition end。

any other API I can use for this situation?

anyone knows how to implement this?

Not sure if there’s an official way to do it in CodeMirror 6 (cc @marijn). However, you can always leverage DOM events: Element: compositionend event - Web APIs | MDN and maintain its states.