Skip to content

Conversation

@rachel-fenichel
Copy link
Collaborator

@rachel-fenichel rachel-fenichel commented Sep 14, 2021

Previously this reached into Blockly.utils.global to make sure that it was getting the same global object as the rest of Blockly.

After this change the code uses globalThis. It won't work in IE, but much of dev-tools and our mocha/sinon test setup does not work in IE.

We add Blockly to the global object to simplify manual debugging from the console while using dev-tools. It's not necessary for automated tests.

Tested by building and starting the dev-tools package locally and inspecting the value of Blockly in the console. Also tested by removing the line entirely to make sure that Blockly was not being added to the global scope somewhere else.

@cpcallen
Copy link
Collaborator

Also tested by removing the line entirely to make sure that Blockly was not being added to the global scope somewhere else.

For posterity: core/msg.js in Blockly does add a Blockly entry to the global namespace, containing only Blockly.Msg.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants