Re: [whatwg/dom] document.createEvent() supports lots of events that most UAs do not support initializers for (#362)

@domenic has the history exactly right in https://github.com/whatwg/dom/issues/362#issuecomment-257628252.

I would be quite happy to reduce the list of events further. In https://bugs.chromium.org/p/chromium/issues/detail?id=603614#c7 and beyond I took @ayg to be skeptical of that enterprise, but that was before considering init*Event methods.

These are the events mentioned in the first comment, linked to Blink's use counters for use with document.createEvent:

* [AnimationEvent](https://www.chromestatus.com/metrics/feature/timeline/popularity/1162)
* [CloseEvent](https://www.chromestatus.com/metrics/feature/timeline/popularity/1227)
* [ErrorEvent](https://www.chromestatus.com/metrics/feature/timeline/popularity/1170)
* [FocusEvent](https://www.chromestatus.com/metrics/feature/timeline/popularity/1171)
* [IDBVersionChangeEvent](https://www.chromestatus.com/metrics/feature/timeline/popularity/1201)
* [PageTransitionEvent](https://www.chromestatus.com/metrics/feature/timeline/popularity/1174)
* [ProgressEvent](https://www.chromestatus.com/metrics/feature/timeline/popularity/1177)
* [TrackEvent](https://www.chromestatus.com/metrics/feature/timeline/popularity/1186)
* [TransitionEvent](https://www.chromestatus.com/metrics/feature/timeline/popularity/1183)
* [WebGLContextEvent](https://www.chromestatus.com/metrics/feature/timeline/popularity/1224)
* [PopStateEvent](https://www.chromestatus.com/metrics/feature/timeline/popularity/1176)
* SVGZoomEvent and SVGZoomEvents are removed
* [BeforeUnloadEvent](https://www.chromestatus.com/metrics/feature/timeline/popularity/1166)
* [WheelEvent](https://www.chromestatus.com/metrics/feature/timeline/popularity/1184)

FocusEvent and TransitionEvent stand out in terms of usage. Investigating what's going on with those using httparchive analysis might reveal something interesting.

Both AnimationEvent and TransitionEvent are also special because Blink also supports [WebKitAnimationEvent](https://www.chromestatus.com/metrics/feature/timeline/popularity/1187) and [WebKitTransitionEvent](https://www.chromestatus.com/metrics/feature/timeline/popularity/1191), and the later has curiously high usage.

For completeness, these are the other events still supported and measured in Blink that aren't mentioned above:
* [CompositionEvent](https://www.chromestatus.com/metrics/feature/timeline/popularity/1168) (has [initCompositionEvent](https://www.chromestatus.com/metrics/feature/timeline/popularity/863))
* [DeviceMotionEvent](https://www.chromestatus.com/metrics/feature/timeline/popularity/1195) (has [initDeviceMotionEvent](https://www.chromestatus.com/metrics/feature/timeline/popularity/865))
* [DeviceOrientationEvent](https://www.chromestatus.com/metrics/feature/timeline/popularity/1196) (has [initDeviceOrientationEvent](https://www.chromestatus.com/metrics/feature/timeline/popularity/866))
* [DragEvent](https://www.chromestatus.com/metrics/feature/timeline/popularity/1169) (no initDragEvent)
* [HashChangeEvent](https://www.chromestatus.com/metrics/feature/timeline/popularity/1172) (no initHashChangeEvent)
* [KeyboardEvents](https://www.chromestatus.com/metrics/feature/timeline/popularity/1228) (alias)
* [MutationEvent](https://www.chromestatus.com/metrics/feature/timeline/popularity/1173) (has [initMutationEvent](https://www.chromestatus.com/metrics/feature/timeline/popularity/870))
* [MutationEvents](https://www.chromestatus.com/metrics/feature/timeline/popularity/1188) (alias)
* [SVGEvents](https://www.chromestatus.com/metrics/feature/timeline/popularity/1190) (alias)
* [StorageEvent](https://www.chromestatus.com/metrics/feature/timeline/popularity/1221) (has [initStorageEvent](https://www.chromestatus.com/metrics/feature/timeline/popularity/871))
* [TextEvent](https://www.chromestatus.com/metrics/feature/timeline/popularity/1182) (has [initTextEvent](https://www.chromestatus.com/metrics/feature/timeline/popularity/832))

So I'd add "DragEvent" and "HashChangeEvent" the the list of endangered strings.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/issues/362#issuecomment-259532878

Received on Wednesday, 9 November 2016 21:34:17 UTC