Summary
The Event interface has 16 constants corresponding to event types from a distant past. The values aren't used anywhere, they merely exist.
Remove the constants with no deprecation period (They aren't deprecated and there as been no Intent to Deprecate, see UseCounter section for why).
Motivation
The other option is to standardize them:
https://github.com/whatwg/dom/issues/334
Compatibility Risk
Quoting a comment from https://crbug.com/674944:
I've taken a look at '.MOUSEDOWN' matches in httparchive:har.2016_11_15_chrome_requests_bodies
There are 7006 matches (from ~500k pages crawled) and after checking a random subset of about 20 all of the non-bogus matches were this pattern:
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown = clickNS4;
}
captureEvents() has long ago been neutered to do nothing, so this would not break. An exhaustive analysis of all the constants doesn't seem warranted.
For WebKit-only things one should normally worry that its were existence is used by some script to detect WebKit without UA sniffing, but that this was once in Netscape and wasn't added to Edge suggests that this isn't widespread if it happens at all.
Alternative implementation suggestion for web developers
These constants do nothing, but if they are used in some mysterious way, just use these numbers instead:
MOUSEDOWN = 1
MOUSEUP = 2
MOUSEOVER = 4
MOUSEOUT = 8
MOUSEMOVE = 16
MOUSEDRAG = 32
CLICK = 64
DBLCLICK = 128
KEYDOWN = 256
KEYUP = 512
KEYPRESS = 1024
DRAGDROP = 2048
FOCUS = 4096
BLUR = 8192
SELECT = 16384
CHANGE = 32768
Usage information from UseCounter
None. Attributes on event cannot be usefully measured due to event copying patterns that greatly inflate the usage. This is also why deprecation is not a good idea. The message would overwhelmingly be noise, and we have found code in the wild to explicitly avoid hitting bogus deprecation messages, which wouldn't be a good use of developer's time.
OWP launch tracking bug
Entry on the feature dashboard
https://www.chromestatus.com/feature/5723085873348608
(Status will be updated when it's clear which milestone the removal will be in.)
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
Thank you all!
LGTM3.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.