Standardize (or remove) KeyboardEvent#initKeyboardEvent (and its arguments) |
||||
Issue descriptionIt has been deprecated in the spec, https://w3c.github.io/uievents/#idl-interface-KeyboardEvent-initializers We should match the spec by removing this API.
,
Feb 23 2017
Usage is 0.0406% I wonder if we can start thinking about deprecating this since it was never implemented in FireFox.
,
Feb 23 2017
That is fairly high usage from something seemingly obscure and not interoperable. Understanding the typical usage here would help, in particular are those 0.0406% broken in Firefox, or is there fallback code? In the worst case, there's some widely used code that uses UA sniffing to only try initKeyboardEvent in non-Gecko and something else in Gecko. It looks like there are only 1898 hits in httparchive, which is a small number given the usage, so possibly usage is concentrated in some fairly large site behind a login that isn't captured in httparchive. https://storage.googleapis.com/blink-httparchive-export/initKeyboardEvent.json is an export of those hits, and https://github.com/foolip/unhar/blob/master/unjson can be used to split it into individual files for detailed analysis. (I haven't tried it yet, so it may break with this input.)
,
Feb 23 2017
,
Sep 19 2017
AFAIK works in Firefox nightly:
> event = new KeyboardEvent("onkeydown", null);
onkeydown { target: null, key: "", charCode: 0, keyCode: 0 }
> event.initKeyboardEvent("onkeyup");
undefined
> event
onkeyup { target: null, key: "", charCode: 0, keyCode: 0 }
,
Sep 19 2017
It should be "keydown" and "keyup", not "onkeydown" and "onkeyup" (this is not Internet Explorer 8 and earlier ;)).
,
Oct 3 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/5e13fac3f90eaed55ceac453466ea3610d9f8b5c commit 5e13fac3f90eaed55ceac453466ea3610d9f8b5c Author: Rob Buis <rob.buis@samsung.com> Date: Tue Oct 03 16:24:19 2017 Sync initKeyboardEvent with the spec This change syncs initKeyboardEvent with the spec: https://w3c.github.io/uievents/#idl-interface-KeyboardEvent-initializers Behavior matches Firefox. Bug: 692703 Change-Id: I8f2129b92df678c963b8759587b29ca97a70a06e Reviewed-on: https://chromium-review.googlesource.com/673370 Commit-Queue: Rob Buis <rob.buis@samsung.com> Reviewed-by: Philip Jägenstedt <foolip@chromium.org> Cr-Commit-Position: refs/heads/master@{#506063} [add] https://crrev.com/5e13fac3f90eaed55ceac453466ea3610d9f8b5c/third_party/WebKit/LayoutTests/external/wpt/uievents/legacy/Event-subclasses-init-expected.txt [add] https://crrev.com/5e13fac3f90eaed55ceac453466ea3610d9f8b5c/third_party/WebKit/LayoutTests/external/wpt/uievents/legacy/Event-subclasses-init.html [modify] https://crrev.com/5e13fac3f90eaed55ceac453466ea3610d9f8b5c/third_party/WebKit/Source/core/events/KeyboardEvent.idl
,
Oct 20 2017
|
||||
►
Sign in to add a comment |
||||
Comment 1 by tkent@chromium.org
, Feb 17 2017