How to propagate ViewPlugin events to the EditorView?

How do I propagate events from a ViewPluginto the EditorView itself?

Example: I want to listen for clicks on a decoration

other plugin code...

eventHandlers: {
      mousedown: (self, e, view) => {
        // self is undefined
        const target =
        if (target.parentElement?.classList.contains('widget')) {

Ideally sth like viewInstance.on(… would work but I couldn’t find any documentation on that topic.

Would appreciate a hint.

I figured it out myself - leaving it here for reference as it might help others.

You simply have to configure the domEventhandlers facet as an extension:

  doc: this.value,
  extensions: [
      mousedown: e => this.handleMouseDown(e)

As far as I understand that event won’t be propagated if handled by another handler that returns true. (For example in the event handlers within the plugin itself)