← Back to release summary

Move onwebkit{animation,transition}XX handlers to GlobalEventHandlers

Category
JavaScript
Type
New or changed feature
Status
Enabled by default (Chrome 81)
Intent stage
Start prototyping

WPT details: https://wpt.fyi/results/html/dom/ (all idlharness tests) https://wpt.fyi/results/html/webappapis/scripting/events/event-handler-all-global-events.html https://chromium-review.googlesource.com/c/chromium/src/+/1807190 (tests for specific interactions above and beyond the API tests) Overall, Firefox currently passes almost every test (one bug with case sensitivity), Chrome will pass every test once this I2S is implemented, and Safari passes most tests (excepting the Document problem noted above).

Summary

Currently, the prefixed onwebkit{animation,transition}XX handlers are only available on the Window object in Chrome. By the spec[0], these should be on GlobalEventHandlers[1] - i.e. available on HTMLElement, Document, and Window. Note that although standardized, these event handlers are still obsolete - web developers should use the non-prefixed versions instead! [0]: https://html.spec.whatwg.org/multipage/webappa [1]: https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers

Motivation

This fix brings us into line with the spec, Gecko, and WebKit.

Standards & signals

Ecosystem

View on chromestatus.com