Composition issue when register compositionend event outside

the extension snippet as below:

when finished typing using IME, console.info for the latest time is false

ViewPlugin.fromClass(
    class {
      decorations = Decoration.none;

      update(update: ViewUpdate) {
        if (!update.selectionSet && !update.docChanged) {
          return;
        }

        // false when finished IME typing 
        console.info(update.transactions[0].isUserEvent('input.type.compose'));
      }
   })

but when add code below , the console.log for the latest is true

// document.body can be replace with any div outside of root dom
// useCapture has to be true
document.body.addEventListener('compositionend', this.bodyEnd, true);

it occurs only when compositionend listener registered with useCapture = true

What does this.bodyEnd do? Does it act on the editor in any way?

Duplicate (#2) of The result of `tr.isUserEvent('input.type.compose')` is unstable in Chrome. · Issue #1116 · codemirror/dev · GitHub