Add beforeselectionchange event · Issue #56 · w3c/selection-api (original) (raw)

Quoting @johanneswilm from w3c/editing#73:

beforeselectionchange has been mentioned a few times. This event should be in the Selection API. If the caret movements intentions are to be moved there, it's important that the beforeselectionchange event contains the user intention (such as: "caret up").

Alternatively the beforeselectionchange event can just have a from-range and a to-range that doesn't need to specify what user intention caused the selection change, and we keep the intended caret movement events the beforeinput.