Make WordPress Core

Opened 4 days ago

Last modified 3 days ago

#44371 new defect (bug)

Make sure all JS globals are explicitly assigned to the window.

Reported by: omarreiss Owned by:
Milestone: 5.0 Priority: normal
Severity: normal Version:
Component: General Keywords: has-patch needs-testing
Focuses: javascript Cc:


Currently there are a lot of variables in the JavaScript that are being defined in the global scope without being explicitly assigned to the window. When we start using Webpack to build all the JavaScript, the code will get encapsulated in an anonymous function and those implicit globals could get assigned to a different scope. To make sure that doesn't happen, I've created a patch to make sure all globals are explicitly assigned to the window.

Attachments (1)

explicit-globals.patch (21.7 KB) - added by omarreiss 4 days ago.

Download all attachments as: .zip

Change History (3)

#1 @subrataemfluence
3 days ago

  • Keywords has-patch needs-testing added

#2 @netweb
3 days ago

  • Milestone changed from Awaiting Review to 5.0
Note: See TracTickets for help on using tickets.