Contact emails
Summary
Deprecate and Remove charCode and keyCode attributes from UIEvent, as these should be on KeyBoardEvent only.
Spec: https://w3c.github.io/uievents/#interface-UIEvent
Motivation
In both Firefox and IE, the charCode and keyCode attributes are on the KeyboardEvent interface, not UIEvent.
https://code.google.com/p/chromium/issues/detail?id=508316
Compatibility Risk
Usage for these attributes are high
UIEventCharCode: 4.32 %
UIEventKeyCode: 6.17 %
But both Firefox and IE, exposes this on KeyBoardEvent interface only.
Alternative implementation suggestion for web developers
In Blink, these attribute always return 0 except for keyboard events. After removal they would instead return undefined.
Usage information from UseCounter
UIEventCharCode: https://www.chromestatus.com/metrics/feature/timeline/popularity/596
UIEventKeyCode: https://www.chromestatus.com/metrics/feature/timeline/popularity/597
OWP launch tracking bug
https://code.google.com/p/chromium/issues/detail?id=508316
Requesting approval to remove too?
As usage are high, we should first deprecate it and probably we can remove it after 2 or 3 release cycles.
Paritosh
That's very interesting, Rick! In the face of that kind of code on popular sites, the use counter data really is useless.
for (c in a) b[c] = a[c];
I doubt it's only Gmail doing this sort of thing (lots of people like event-wrapping/delegation libraries).