Skip to content

Ensure javascript classes declared outside an IIFE are properties of window

username-removed-636429 requested to merge fix-non-iife-classes into master

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?

What are the relevant issue numbers?

N/A

Merge request reports

Loading