Skip to content

Commit

Permalink
Apply Edge smilns detection fix from FakeSmile#7
Browse files Browse the repository at this point in the history
Uses the modernizr detection.
smilanimns, smil2ns smil21ns and smil3ns are still incorrectly marked as supported, but these seem to be for external SMIL documents, rather rare on the Internets.

This workaround should already enable basic inline SMIL in SVG.
  • Loading branch information
Kaiido committed Jun 27, 2018
1 parent 23c5cea commit ff2b405
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion smil.user.js
Expand Up @@ -93,7 +93,7 @@ function smile(animating) {
// NOTE: feature strings are broken in ASV - apparently only declarative switch declarations work
// (we have already filter this implementation, though, during the loading phase)
// http://tech.groups.yahoo.com/group/svg-developers/message/61236
ns2proc[svgns] = !impl.hasFeature("http://www.w3.org/TR/SVG11/feature#Animation", "1.1"); //&& !impl.hasFeature("org.w3c.svg.animation", "1.0");
ns2proc[svgns] = !(document.createElementNS && /SVGAnimate/.test(document.createElementNS("http://www.w3.org/2000/svg", "animate")))
ns2proc[smilanimns] = !impl.hasFeature(smilanimns, "1.1");
ns2proc[smil2ns] = !impl.hasFeature(smil2ns, "2.0");
ns2proc[smil21ns] = !impl.hasFeature(smil21ns, "2.1");
Expand Down Expand Up @@ -1577,3 +1577,4 @@ try {
// (but that's not an issue as most popular versions, ASV3 and ASV6 beta, both support SMIL)
window.addEventListener("load", initSMIL, false);
} catch(exc) {}
tch(exc) {}

0 comments on commit ff2b405

Please sign in to comment.