mirror of
https://github.com/google/blockly.git
synced 2026-01-10 10:27:08 +01:00
Migrate core/msg.js to goog.module syntax (#5448)
* Migrate core/msg.js to goog.module * Migrate core/msg.js named requires
This commit is contained in:
committed by
GitHub
parent
53061ac6e5
commit
7a2e23876e
13
core/msg.js
13
core/msg.js
@@ -14,18 +14,19 @@
|
||||
* Name space for the Msg singleton.
|
||||
* Msg gets populated in the message files.
|
||||
*/
|
||||
goog.provide('Blockly.Msg');
|
||||
goog.module('Blockly.Msg');
|
||||
goog.module.declareLegacyNamespace();
|
||||
|
||||
goog.require('Blockly.utils.global');
|
||||
const global = goog.require('Blockly.utils.global');
|
||||
|
||||
|
||||
/**
|
||||
* Exported so that if Blockly is compiled with ADVANCED_COMPILATION,
|
||||
* the Blockly.Msg object exists for message files included in script tags.
|
||||
*/
|
||||
if (!Blockly.utils.global['Blockly']) {
|
||||
Blockly.utils.global['Blockly'] = {};
|
||||
if (!global['Blockly']) {
|
||||
global['Blockly'] = {};
|
||||
}
|
||||
if (!Blockly.utils.global['Blockly']['Msg']) {
|
||||
Blockly.utils.global['Blockly']['Msg'] = Blockly.Msg;
|
||||
if (!global['Blockly']['Msg']) {
|
||||
global['Blockly']['Msg'] = exports;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user