mirror of
https://github.com/google/blockly.git
synced 2026-01-09 01:50:11 +01:00
Migrate core.global.js to named exports (#5451)
This is part of #5153 but is being prioritised because we want remove the declareLegacyNamespace calls from the core/utils/*.js modules and then reexport them explicitly via utils.js, and it turns out that doing so results in the exports object of this module being passed to Object.freeze - which fails on the global object, which can't be made non-extensible! The new name chosen for the former default export is globalThis, since it is intended to have the same value as the global variable of that name; see: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis
This commit is contained in:
committed by
GitHub
parent
09fb59f6ee
commit
f9d0caa112
@@ -42,7 +42,7 @@ Blockly.JavaScript.addReservedWords(
|
||||
// Magic variable.
|
||||
'arguments,' +
|
||||
// Everything in the current environment (835 items in Chrome, 104 in Node).
|
||||
Object.getOwnPropertyNames(Blockly.utils.global).join(','));
|
||||
Object.getOwnPropertyNames(Blockly.utils.global.globalThis).join(','));
|
||||
|
||||
/**
|
||||
* Order of operation ENUMs.
|
||||
|
||||
Reference in New Issue
Block a user