Re: [svgwg] Use element re-write & related changes

I haven't followed the discussion on this topic so I didn't know we 
were actually exposing the shadow tree. Assuming that is the approach 
we want going forward, then I think the animation section here seems 
reasonable.

However, with regards to how we spec the Web Animations part, I think 
that rather than defining everything in prose, it would be preferable 
to introduce a new sub-type of `Animation` that exhibits the mirroring
 behavior. e.g.

```webidl
[Constructor (Animation source)]
interface ShadowAnimation : Animation { };
```

Then we could define that `ShadowAnimation` objects throw 
`NoModificationAllowedError` (or whatever the appropriate error is in 
this case) for each of the mutator methods (e.g. `pause()` etc.).

Furthermore, you might expose the `source` `Animation` as a readonly 
attribute and further spec that this object reflects all changes to 
`source`.

So, I guess what I'm suggesting is to define `ShadowAnimation` as a 
generic thing that could be potentially used in other situations, and 
then just use that concept here.

The idea of adding sub-types of `Animation` is not new. The 
[`CSSAnimation`](https://drafts.csswg.org/css-animations-2/#cssanimation)
 and 
[`CSSTransition`](https://drafts.csswg.org/css-transitions-2/#csstransition)
 interfaces are already defined elsewhere and we're [currently looking
 at defining a `FillAnimation` 
sub-interface](https://github.com/w3c/web-animations/issues/118) that 
would also throws on most mutation operations--it's slightly 
different, however, in that it still allows cancelling.

The interaction between `FillAnimation` objects and `ShadowAnimation` 
objects would need to be defined, but first we need to investigate if 
`FillAnimation` is going to happen or not.

-- 
GitHub Notification of comment by birtles
Please view or discuss this issue at 
https://github.com/w3c/svgwg/pull/206#issuecomment-234436749 using 
your GitHub account

Received on Friday, 22 July 2016 02:11:44 UTC