-
-
Notifications
You must be signed in to change notification settings - Fork 233
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
need to update minified file #52
Conversation
uglifyjs classList.js > classList.min.js -m
Oh thanks for catching that. I forgot to update it. |
the minified version of classlist polyfill used was out of date (eligrey/classList.js#52) Specifically it was not testing for classlist support on svg elements, causing ngClass directives on svg elements to fail (and I presume any other directives with dependency on classlist as well) I minified the latest version of the classlist polyfill, and included it into shims_for_IE.js
the minified version of classlist polyfill used was out of date (eligrey/classList.js#52) Specifically it was not testing for classlist support on svg elements, causing ngClass directives on svg elements to fail (and I presume any other directives with dependency on classlist as well) I minified the latest version of the classlist polyfill, and included it into shims_for_IE.js
This commit is an update for shims_for_IE with the latest version of the classlist polyfill. The minified version of the classlist polyfill used was out of date (eligrey/classList.js#52) Specifically it was not testing for classlist support on svg elements, causing ngClass directives on svg elements to fail (and I presume any other directives with dependency on classlist as well) note, the PR mentioned above has been accepted by the author.
There may be a problem with the new file. We have been using classList.min.js (via rawgit) and now IE11 acts as though it has no shim. |
thanks, I'll retest and comment back here. |
Can you try this plunkr? https://plnkr.co/edit/jALLcYE3zvxYeYZ0O5Dh I am only testing for the existence of the classList function, as I simply minified the lastest unminified code. I get the same results in both minified and unminified version of the file. If we don't include either polyfill, the classList function does not exist on svg elements on IE11, as expected. If the latest unminified file has other functional changes you're seeing from the older minified file then perhaps that's a separate issue :) Can you redo your own test using the unminified version from rawgit? |
It's the older-minified-file situation. I found it in the Issues here: #44 |
ah, that's interesting. so failing the check doesn't simply skip the polyfill, it runs different code that patches just a couple of the classlist functions (which you need). That's not that clear if you're just looking at that initial test :) So the work to include the polyfill for svg elements should probably be separated out, so it could be applied to svg elements only (if needed), leaving the dom element prototype intact. and then, that second branch that patches those specific functions should be run in every case, and updated to handle svg elements as well. |
@RoyEJohnson, I have a change that might resolve your issue while still applying the polyfill for SVG elements. I understand you might not care about SVG support, but would you mind trying this: This change applies the full polyfill if needed, so that svg elements get the polyfill, but also applies the partial patch to support IE that is being skipped in the latest version here (the cause of the problem you saw). If it passes your test, I'll submit PR for Eli. I'm not really certain this will work, as the partial polyfills should not pass their tests to be applied after receiving the full polyfill, but I'm not sure exactly what failed for you to know for sure. :) Cheers, |
The minified file is out of date. Angularjs2 team is using the outdated version in their shims_for_IE.js file. I stumbled across the svg issue in IE11. I'll be sending them pull request for this as well.
I minified the file using uglifyjs as follows:
uglifyjs classList.js > classList.min.js -m
Not sure what you were using to minify the file originally. :)