Intent to Ship: Animation constructor

68 views
Skip to first unread message

Stephen Mcgruer

unread,
Apr 2, 2019, 10:14:52 AM4/2/19
to blink-dev
smcg...@chromium.org https://drafts.csswg.org/web-animations-1/#the-animation-interface https://drafts.csswg.org/web-animations-1/ Currently the Web Animations API allows developers to create animations using the Element.animate() method, which returns an Animation object that is internally constructed. The full Animation constructor gives the developer more control over the created Animation, including specifying the timeline (currently useless, but in the future enables other types of timelines) and the exact KeyframeEffect object (see https://www.chromestatus.com/feature/4868532347076608) This was implemented as part of the general 'Web Animations' intent to implement, which happened years ago and for which I cannot find a link :)
Low risk. This interface is stable in the API. Firefox has already shipped it, and Safari has previewed it in its tech-preview of Web Animations. Firefox: Shipped (https://bug1245000.bmoattachments.org/attachment.cgi?id=8743702) Edge: No public signals Safari: In development Web developers: No signals No known ergonomics risks. None expected.
Yes Yes https://wpt.fyi/results/web-animations/interfaces/Animation/constructor.html?label=master&product=chrome%5Bexperimental%5D&product=edge&product=firefox%5Bstable%5D&product=safari%5Bexperimental%5D&aligned (Compares Chrome experimental to Firefox stable + Safari experimental) http://crbug.com/948657 https://www.chromestatus.com/features/5301000724283392

Philip Jägenstedt

unread,
Apr 2, 2019, 11:37:14 AM4/2/19
to Stephen Mcgruer, blink-dev
LGTM1, thanks for taking care of this!

Interfaces that are initially exposed and later gain a constructor with no required arguments are a bit of a pain for feature detection. I guess that trying to use the constructor and catch an exception is the only way to use this?

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CADY3Maebba18gdHxAE5SUjRd3NquVvhe82_T%2B0duoq5sJnywNA%40mail.gmail.com.

Stephen Mcgruer

unread,
Apr 2, 2019, 11:55:40 AM4/2/19
to Philip Jägenstedt, blink-dev
I believe this should be detectable just from window.Animation. On Chrome today that doesn't exist:

console.log('Animation' in window)
VM187293:1 false
 
I think this means I have misrepresented the I2S slightly by accident; we actually want to ship the existence of window.Animation too.

Daniel Bratell

unread,
Apr 2, 2019, 3:06:24 PM4/2/19
to Philip Jägenstedt, Stephen Mcgruer, blink-dev
LGTM2

/Daniel
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/CADY3Mafg8ZUkfQQ%3Dzh8UvHoPKfZX1e3zUtoRCUvdW%3Daq0xV8aw%40mail.gmail.com.



--
/* Opera Software, Linköping, Sweden: CET (UTC+1) */

Chris Harrelson

unread,
Apr 2, 2019, 3:48:40 PM4/2/19
to Daniel Bratell, Philip Jägenstedt, Stephen Mcgruer, blink-dev

smcg...@chromium.org

unread,
Apr 2, 2019, 4:04:41 PM4/2/19
to blink-dev, bra...@opera.com, foo...@chromium.org, smcg...@chromium.org
Thank you all for the very quick LGTMs. I will note that this I2S really relies on https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/1EQKF7il48U to ship first otherwise the constructor is not very useful, so I would love some LGTMs there too! 
Reply all
Reply to author
Forward
0 new messages