[4.4][bugfix] Use iife for the scripts core and validate#43755
Merged
MacJoom merged 5 commits intojoomla:4.4-devfrom Aug 1, 2024
Merged
[4.4][bugfix] Use iife for the scripts core and validate#43755MacJoom merged 5 commits intojoomla:4.4-devfrom
MacJoom merged 5 commits intojoomla:4.4-devfrom
Conversation
Member
|
thanks! I will test it later |
This comment was marked as outdated.
This comment was marked as outdated.
Member
|
No, Ignore me 😄 |
Member
|
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 |
Contributor
Author
|
Classes exposed to the global scope |
Member
|
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. |
Member
|
For testing. Before: |
Contributor
|
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. |
Contributor
|
RTC This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43755. |
Contributor
|
Thank you! |
dgrammatiko
added a commit
to dgrammatiko/joomla-cms
that referenced
this pull request
Aug 11, 2024
* iife * fixes * globals ---------
dgrammatiko
added a commit
to dgrammatiko/joomla-cms
that referenced
this pull request
Aug 11, 2024
* iife * fixes * globals ---------
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request for Issue #43714 .
Summary of Changes
Use iife instead of esm for the scripts core and validate
Testing Instructions
npm installconst initialize = 1;and hit Enter.Before:
Error SyntaxError: Identifier 'initialize' has already been declaredAfter: 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