Re: [web-animations] Moving the name attribute to Animation

SGTM, but should we go with 'id' instead of 'name' (which I think is what
we ended up deciding was best in the May 25th f2f)?

Cheers,
    -Shane

On Wed, Jul 1, 2015 at 12:07 PM Brian Birtles <bbirtles@mozilla.com> wrote:

> Hi,
>
> Currently, Web Animations defines a 'name' attribute on
> KeyframeEffectReadOnly. I think this belongs on Animation.
>
> Rationale: We plan to define CSSAnimation.animationName and
> CSSTransition.transitionProperty largely for the purpose of identifying
> particular animations running on an element. These two properties are
> readonly. The 'name' property is intended to serve a similar purpose but
> for script-generated animations or when a mutable identifier is
> required. Hence it should live on the same object: Animation (from which
> CSSAnimation and CSSTransition derive).
>
> My proposal:
>
> * Remove 'name' from KeyframeEffect(ReadOnly)
> * Remove 'name' from KeyframeEffectOptions
> * Add 'name' to Animation as a writeable property
> * Optional: Extend the constructor for Animation to include a
>    third argument, 'name'.
>
>    Alternatively (and probably better), add an AnimationOptions
>    dictionary with a single member 'name' and make that the
>    third argument.
>
> * Optional: Add a KeyframeAnimationOptions dictionary that extends
>    from KeyframeEffectsOptions and includes a 'name' member.
>
>    Update the Animatable interface so that the animate method
>    takes an options object whose type is:
>
>      optional (double or AnimationOptions) options
>
>
> What do you think?
>
> Brian
>
>

Received on Wednesday, 1 July 2015 02:31:52 UTC