-
Notifications
You must be signed in to change notification settings - Fork 78
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
Replace jQuery.extend with Object.assign #291
Conversation
Support is virtually full for all browsers, if needed a polyfill could be thrown in. Results should be equal with jQuery. Fixes getgrav#290.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’m ok with the change but would definitely prefer to see the polyfill in place. I’ve seen issues still with IE Edge and with this being also frontend plugin it’s probably best to be safer than sorry.
I also think this is not the only place where we do extend in the plugin, was it?
The only other place jQuery.extend is used is in the file-field, which requires jQuery outright. Could potentially be replaced with vanilla JS too, but this PR only backfills in where jQuery isn't really needed. I'll look at adding in the polyfill, which should resolve some IE issues if I'm not mistaken. |
Needs to be recompiled into form.min.js.
Latest commit adds the polyfill, though as noted it needs to be compiled. The webpack and gulp setups won't run on my Windows DevEnv, but with the polyfill included (but not jQuery), it throws no errors in MS Edge. |
See #305 But running webpack directly works: |
This looks good now @OleVik but where are you loading the polyfill from? |
@OleVik Actually I missed your message, I'll look at adding it in the mix and transpiling. Cheers |
…ow language is merged so it’s not using jQuery
Support is virtually full for all browsers (ref), if needed a polyfill could be thrown in. Results should be equal with jQuery (test). Fixes #290.