Re: SVGAnimationElement.getStartTime

On Thu, 29 Jan 2009 07:00:07 +0100, Cameron McCormack <> wrote:

> Hi Brian.
> Brian Birtles:
>> I would like to revisit the specification of
>> SVGAnimationElement.getStartTime. As noted by Cameron McCormack in January
>> 2006[1] the SVG 1.1 specification simply states that this method:
>>   Returns the start time in seconds for this animation.[2]
>> However, it does not specify which start time in the case of multiple start
>> times. Is it the start time of the current active interval? And if there is
>> no current active interval is it the start time of the next interval or the
>> previous interval?
>> I have produced a small test of this behaviour[3] and note that Opera 9.62
>> appears to return the start time of the current interval, or failing that
>> the start time of the next interval, or failing that the start time of the
>> previous interval.
>> I think it is necessary to define this behaviour more adequately.
>> Unfortunately Cameron McCormack's previous query went unanswered. Is it
>> possible to add an erratum specifying this behaviour?
> The Working Group discussed this and settled on the method returning the
> begin time of the current interval, where “current interval” is defined by
> SMIL to be the active interval, if one exists, otherwise the next
> interval that will begin, if such an interval is known.  If called when
> there is no current interval, then an INVALID_STATE_ERR DOMException is
> thrown.
> The erratum is here:
> and will be published to the official SVG 1.1 errata page soon.  The
> link to the test case is broken, but the test is at:
> though note that it hasn’t been reviewed yet.

Having thought about this some more, and having looked at our code to see what we do and why...

Opera is currently returning start time for the current interval if it exists, failing that the most recently ended interval if that exists, failing that we return 'undefined'.

The reasoning is that it's sometimes useful in script to know the last used start time, even if there is no current interval.

Some comments on the test:
- it would be nice if there were subtests for multiple begin values, with and without 'indefinite'
- perhaps use 'lime' instead of 'blue' for pass?


Erik Dahlstrom, Core Technology Developer, Opera Software
Co-Chair, W3C SVG Working Group
Personal blog:

Received on Thursday, 29 January 2009 10:07:58 UTC