[4.0] Recaptcha plugins javascript#26839
[4.0] Recaptcha plugins javascript#26839wilsonge merged 3 commits intojoomla:4.0-devfrom dgrammatiko:4.0-dev-es6-1
Conversation
| const itemNodes = document.getElementsByClassName('g-recaptcha'); | ||
| const optionKeys = ['sitekey', 'theme', 'size', 'tabindex', 'callback', 'expired-callback', 'error-callback']; | ||
| const items = [].slice.call(itemNodes); | ||
| const elements = [].slice.call(document.getElementsByClassName('g-recaptcha')); |
There was a problem hiding this comment.
No need for an array slice call here
There was a problem hiding this comment.
Actually this script is targeting the front end thus is better to make sure that the es5 version will work down to IE9. Since there is the option to provide es5 scripts I think it would be better those scripts could live without the need for a polyfill...
There was a problem hiding this comment.
My point is that the ES5 scripts should reflect on the browsers that run on that version and IE9 is the oldest one that had pretty decent js engine. Also my idea here is to not put artificial barriers. Obviously I won't build a site with support for IE9 but all my deliverables are still fully functional on IE11. The idea of killing ES5 before IE11 is dead IMHO is a really bad one especially when there is a very well known and established practice that will fulfil both words (type=module, nomodule)...
|
Thanks! |
Pull Request for Issue # .
Summary of Changes
Joomlaobject, drop the global variables (not the ones from Google)Testing Instructions
Both versions of captchas are still functional
Expected result
Actual result
Documentation Changes Required
No