W3C home > Mailing lists > Public > public-fx@w3.org > April to June 2014

Re: Units of time in Web Animations [was: Intent to Ship: Element.animate]

From: Brian Birtles <bbirtles@mozilla.com>
Date: Thu, 17 Apr 2014 15:00:37 +0900
Message-ID: <534F6E05.6040705@mozilla.com>
To: public-fx@w3.org
(2014/04/17 11:36), Boris Zbarsky wrote:
> On 4/16/14 8:42 PM, Brian Birtles wrote:
>> I thought we could possibly make the TimingInput dictionary's 'duration'
>> member be a union type "(DOMString or double)" but they're not
>> distinguishable right?
>
> They didn't use to be, but now they are.  See the table at
> http://heycam.github.io/webidl/#dfn-distinguishable

I was mistakenly looking at TR. Good to know.

> In terms of processing model for this case, if the value is a Number,
> the numeric type is picked.  Otherwise the value is coerced to a string
> and DOMString is picked.
>
> So you could do this.
>
> Of course long term value types in ES will be the solution here, with
> the caller being able to pass in things like 2000ms as a value, not a
> string.  But that's pretty long term.

Yes, that's the approach we ultimately want to go with. We'll add the 
union type in the short/medium-term if people ask for it.

Thanks Boris,

Brian
Received on Thursday, 17 April 2014 06:01:06 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:49:49 UTC