Ensure javascript classes declared outside an IIFE are properties of window
What does this MR do?
A few javascript class
declarations are currently located outside of IIFE closures, which has the side effect of placing these classes into properties of window
. However, once we switch to a bundler like webpack these will all end up being wrapped into their own closures and this side effect will no longer occur. Therefore any classes which were relying on being assigned to the global namespace (window
) must explicitly do so.
This MR takes all class declarations which occur outside of an IIFE and adds window.ClassName = ClassName;
to the bottom of the script.
Are there points in the code the reviewer needs to double check?
Why was this MR needed?
Screenshots (if relevant)
Does this MR meet the acceptance criteria?
-
Changelog entry added -
Documentation created/updated -
API support added - Tests
-
Added for this feature/bug -
All builds are passing
-
-
Conform by the merge request performance guides -
Conform by the style guides -
Branch has no merge conflicts with master
(if it does - rebase it please) -
Squashed related commits together
What are the relevant issue numbers?
N/A