-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
[4.4][bugfix] Use iife for the scripts core and validate #43755
Conversation
thanks! I will test it later |
This comment was marked as outdated.
This comment was marked as outdated.
No, Ignore me 😄 |
It works, but, wee need to set some globals back. please add: window.JFormValidator = JFormValidator;
window.punycode = punycode; Someone may use it in their scripts, even though |
Classes exposed to the global scope |
I have tested this item ✅ successfully on 348daed This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43755. |
For testing. Before: |
I have tested this item ✅ successfully on 348daed This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43755. |
RTC This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43755. |
Thank you! |
* iife * fixes * globals ---------
* iife * fixes * globals ---------
Pull Request for Issue #43714 .
Summary of Changes
Use iife instead of esm for the scripts core and validate
Testing Instructions
npm install
const initialize = 1;
and hit Enter.Before:
Error SyntaxError: Identifier 'initialize' has already been declared
After: No error
Actual result BEFORE applying this Pull Request
Leaking variables in the global scope
Expected result AFTER applying this Pull Request
NO leaking variables in the global scope
Link to documentations
Please select:
[] Documentation link for docs.joomla.org:
No documentation changes for docs.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed
@Fedik