User tests: Successful: Unsuccessful:
Pull Request for Issue #16766 .
Fixes a console error in modal-associations.js,
Honestly I have no clue what I did here. Just followed @dgt41 instructions and it worked
Edit an article in the association component
No console error
Console error
None
| Status | New | ⇒ | Pending |
| Category | ⇒ | JavaScript |
| Status | Pending | ⇒ | Fixed in Code Base |
| Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-06-19 12:10:12 |
| Closed_By | ⇒ | wilsonge | |
| Labels |
Added:
?
|
||
Ah, thanks. Makes sense
It's not black magic, but let me explain:
we have a simple function were we pass 2 arguments (Joomla and window) both defined (the first on a line above the function declaration and the other one from the browser)
Now that function we want to be contained in an IIFE (Immediately-Invoked Function Expression) which has a very nice advantage as we don't end up with global variables. So a simple IIFE is like:
(function() {})();But in our case we need to pass some arguments to the function so we do that like:
I hope this is helpful