[css-animations] What happens if a @keyframes rule is added after the fact?

Hi,

If I set "animation: doesntYetExist 10s" and, within 10s, add 
"@keyframes doesntYetExist { ... }" by script, what happens?

a) The animation doesn't start
b) The animation starts from the beginning
c) The animation picks up from part-way through

 From my testing, IE does (a) and Chrome does (b). Current nightlies of 
Firefox do (c).

This question also relates to whether dynamic changes to keyframes are 
honoured. David pointed out several years ago that the spec says values 
are snapshotted but WebKit doesn't do this (and hence nor does Gecko) 
and that there may be good reasons for allowing dynamic changes to 
keyframes.[1]

I think (a) is more in keeping with the current wording of the spec but 
if we allow dynamic changes to keyframes then either (b) or (c) would be 
possible.

Best regards,

Brian

[1] http://lists.w3.org/Archives/Public/www-style/2011Apr/0079.html

Received on Thursday, 3 July 2014 02:15:11 UTC