New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SMIL Animation in Microsoft Edge not animating #7
Comments
Please test again with the latest available code: a few fixes (targeting IE and generic) were made. If it still doesn't work, please attach a (reduced, if possible!) test case and detail which animations don't work in Edge (together with FakeSmile and Edge versions used in testing). |
Looks like document.implementation.hasFeature(x, y) in MS Edge returns true for any strings x, y |
Modernizr(smil) returns false in MS Edge so its possible to workaround the problem using additional library and extra conditions in smil.user.js |
Modernizr attempts to create an animate element in the SVG namespace to detect SMIL support. We're already using it in |
So, I've made some research and
The link in the above quoted text contains several interesting links to (MDN article, W3C discussion and current spec. wording). This explains why I wasn't able to find any Edge-related bug reports or other kinds of complains regarding lack of support.
This seems aligned with the current spec. text, where The proposal is to rework our code which uses |
SMIL animations are still not working for me in Edge. I'm using the polyfill successfully in IE9-11 but Edge refuses to play any animations. I guess that still has to do with the browser detection you guys have discussed above but I'm not sure how to tackle this without going into the plugin core and figuring out where the detection takes place. I might find some time to do this soon but I was wondering if there's any quick fix to enable animations in Edge? |
This will likely work (it's an extract of what I'm currently working on):
I'd welcome feedback regarding this fix (whether it worked or, if not, in which circumstances). |
@ledahulevogyre: Do you recall which implementations support "less common namespaces" for which we currently use
If there are known examples which use them, that would also be quite handy. Thanks! |
@HelderMagalhaes The fix you mention above does not work for me. What made it work for me was to build the Modernizr code for SVG SMIL and then take the line that interested me and tweak it a bit. So I ended with: ns2proc[svgns] = !(document.createElementNS && /SVGAnimate/.test(document.createElementNS("http://www.w3.org/2000/svg", "animate"))); |
@BishopBarber I think you are missing an explanation mark at the start of the assignment |
@davthu I'm unsure I correctly understand your statement. Do you mean "exclamation mark"? If so, are you talking about my implementation or about HelderMagalhaes' that didn't work for me? |
@BishopBarber Yes I ment "exclamation mark" Thanks for the correction :-) There is nothing wrong with your code snippet, just that in the Modernzr original source they put a double exclamation mark in front of the expression, but Im not sure why... |
@BishopBarber |
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.
The double exclamation mark is just a "trick" for making sure the result is a pure boolean. (reference) |
Update: confirmed that this issue occurs up to the latest (last?) version of EdgeHTML. If anyone has compatibility issues using "Edgium" (Chrome-based Edge), please file a separate issue. Edge version (... --> Settings --> About this app):
Windows version (
|
I saw this bug out for Edge detection. It appears that this repo has the correct detection, but the JS running the actual animations doesn't appear to be working. This polyfill works fine in Internet Explorer, but I'm going to need to come up with some sort of fallback for Edge users at this time. We're in a strange juncture where Chrome's deprecating SMIL and Edge has no interest in SMIL opting for the not-yet-complete-or-implemented web animations, but I had a SMIL thing working cross-browser in prod and now it's not.
The text was updated successfully, but these errors were encountered: