Intent to Ship: Move onwebkit{animation,transition}XX handlers to GlobalEventHandlers

81 views
Skip to first unread message

Stephen Mcgruer

unread,
Jan 10, 2020, 10:04:02 AM1/10/20
to blink-dev
smcg...@chromium.org N/A Specification: https://html.spec.whatwg.org/multipage/webappapis.html#event-handlers-on-elements,-document-objects,-and-window-objects (onwebkitanimationend, onwebkitanimationiteration, onwebkitanimationstart, onwebkittransitionend) 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
N/A - this is a direct Intent to Ship.
This fix brings us into line with the spec, Gecko, and WebKit.
This change should be a win for interoperability and compatibility, since it brings us in line with the other browsers. The biggest risk is that web developers end up using the prefixed versions rather than the non-prefixed versions. Note that this already happens today, the high usage is why we spec'd these handlers rather than deprecate them! Firefox: Shipped (https://searchfox.org/mozilla-central/rev/9415ecf29ba1acbef9381335e0ecde5916ca4073/dom/webidl/EventHandler.webidl#138-141) Edge: No public signals Safari: Shipped (https://github.com/WebKit/webkit/blob/8b95fadedc51b4dd26cfff21fe4cad6a78d84177/Source/WebCore/dom/Element.idl#L117-L120) Safari incorrectly specs the handlers on Window and Element rather than GlobalEventHandlers; this means they are missing Document. Web developers: No signals
Yes Yes
https://wpt.fyi/results/html/dom/ (all the 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) 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). https://www.chromestatus.com/feature/4833112531927040

Rick Byers

unread,
Jan 10, 2020, 11:39:10 AM1/10/20
to Stephen Mcgruer, blink-dev
LGTM1

It's always sad to have to continue to maintain and improve obsolete prefixed APIs, but the alternative is worse :-). Thanks for pragmatically driving interop!

--
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.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CADY3Mad%3DWOB%2BabquaX8mKoQXv6GE6TuK2N-hCq_VHutX1H9QoQ%40mail.gmail.com.

Boris Zbarsky

unread,
Jan 10, 2020, 12:45:43 PM1/10/20
to Stephen Mcgruer, blink-dev
On 1/10/20 10:03 AM, Stephen Mcgruer wrote:
> Firefox currently passes almost every test (one bug with case sensitivity),

Stephen,

Thank you for the thorough tests! I filed
https://bugzilla.mozilla.org/show_bug.cgi?id=1608498 to track this.

-Boris

PhistucK

unread,
Jan 12, 2020, 4:37:27 AM1/12/20
to Stephen Mcgruer, blink-dev
It would be nice to file a bug with WebKit regarding their missing implementation...

PhistucK


--

Stephen Mcgruer

unread,
Jan 13, 2020, 7:48:18 AM1/13/20
to PhistucK, blink-dev
A very good suggestion Phistuck; https://bugs.webkit.org/show_bug.cgi?id=206170 filed

Philip Jägenstedt

unread,
Jan 13, 2020, 8:26:07 AM1/13/20
to Stephen Mcgruer, PhistucK, blink-dev
LGTM2

If we keep either removing or standardizing webkit-prefixed APIs, then soon enough there won't be any left in limbo and we can worry about interop in other areas :)

Daniel Bratell

unread,
Jan 13, 2020, 9:43:38 AM1/13/20
to Philip Jägenstedt, Stephen Mcgruer, PhistucK, blink-dev
Reply all
Reply to author
Forward
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
0 new messages