Determining supported elements via Javascript

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Determining supported elements via Javascript

Dan Rumney
All,

As you know, the Mozilla implementation of SVG doesn't support
elements.

In particular, support for the animation elements is not yet complete.

In order to animate SVG documents, you must use Javascript.

What I'd like to be able to do is determine whether an SVG animation
element is supported and, if it is, use it. If it isn't, I can fall
back to JS animation.

Does anybody know of a way to do this?

Thanks

Dan
_______________________________________________
dev-tech-svg mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-svg
Reply | Threaded
Open this post in threaded view
|

Re: Determining supported elements via Javascript

Boris Zbarsky
Dan Rumney wrote:
> What I'd like to be able to do is determine whether an SVG animation
> element is supported and, if it is, use it. If it isn't, I can fall
> back to JS animation.

hasFeature() ?

-Boris
_______________________________________________
dev-tech-svg mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-svg
Reply | Threaded
Open this post in threaded view
|

Re: Determining supported elements via Javascript

Jeff Schiller
On Sep 25, 11:34 pm, Boris Zbarsky <[hidden email]> wrote:
> Dan Rumney wrote:
> > What I'd like to be able to do is determine whether an SVG animation
> > element is supported and, if it is, use it. If it isn't, I can fall
> > back to JS animation.
>
> hasFeature() ?
>
> -Boris

Yes, I agree with Boris, hasFeature() and check for SMIL support.  You
can even install the FakeSmile JS library so that you only have to
code your SMIL and it will (basically) work in multiple browsers (with
fallback to the JS library for those browsers not supporting SMIL).

Regards,
Jeff
_______________________________________________
dev-tech-svg mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-svg
Reply | Threaded
Open this post in threaded view
|

Re: Determining supported elements via Javascript

Dan Rumney
In reply to this post by Boris Zbarsky
On Sep 25, 11:34 pm, Boris Zbarsky <[hidden email]> wrote:
> Dan Rumney wrote:
> > What I'd like to be able to do is determine whether an SVG animation
> > element is supported and, if it is, use it. If it isn't, I can fall
> > back to JS animation.
>
> hasFeature() ?
>
> -Boris

Thanks,

That would appear to be what I'm looking for.
_______________________________________________
dev-tech-svg mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-svg