ericwilligers / svg-animation

Implement SVG animation in JavaScript using Web Animations
Apache License 2.0
120 stars 20 forks source link

Event names too restrictive #36

Open erikdahlstrom opened 8 years ago

erikdahlstrom commented 8 years ago

https://github.com/ericwilligers/svg-animation/blob/master/smil-in-javascript.js#L59 lists a bunch of event names. For all intents the SMIL syntax is meant to support any and all event types that a UA supports, so the restricted set here doesn't make sense (ideally it should match against supported event types in the UA, but failing that it's still better to just register event listeners for all found event names).

Also, note that some of the event names have been changed in svg2, dropping the "SVG" prefix on a few of these events, e.g it's 'load' instead of 'SVGLoad'.