On 2020/01/09 3:35, James Graham wrote:
> Are there wpt tests for this feature?
Unfortunately, it's tested only in simple cases:
https://searchfox.org/mozilla-central/search?q=beforeinput&case=false®exp=false&path=web-platform
The reason is, "beforeinput" event is fired when browser's built-in
editor modifies the DOM, however, most of them the cases are caused by
browser specific shortcut keys, DnD, autocomplete, spellchecker, etc.
Therefore, most of them are tested by mochitest.
> What's the implementation status
> in other browsers?
Blink and WebKit implemented it:
Blink:
https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/W-Q1yWW-zas
WebKit:
https://bugs.webkit.org/show_bug.cgi?id=163021
Except EdgeHTML, Gecko is the last one which does not support
"beforeinput" event.
And also I forgot to write links to Input Events:
Level 1:
https://rawgit.com/w3c/input-events/v1/index.html
Level 2:
https://w3c.github.io/input-events/
We keep supporting Level 1 for now since Level 2 has some backward
compatibility concerns:
https://github.com/w3c/input-events/issues/87
https://github.com/w3c/input-events/issues/86
(Chrome supports Level 1, Safari supports Level 2 partially.)