mirror of
https://github.com/google/blockly.git
synced 2026-01-07 17:10:11 +01:00
Migrate core/utils/global.js to goog.module
This commit is contained in:
@@ -10,20 +10,17 @@
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* @name Blockly.utils.global
|
||||
* @namespace
|
||||
*/
|
||||
goog.provide('Blockly.utils.global');
|
||||
goog.module('Blockly.utils.global');
|
||||
goog.module.declareLegacyNamespace();
|
||||
|
||||
|
||||
/**
|
||||
* Reference to the global object.
|
||||
*
|
||||
* More info on this implementation here:
|
||||
* https://docs.google.com/document/d/1NAeW4Wk7I7FV0Y2tcUFvQdGMc89k2vdgSXInw8_nvCI/edit
|
||||
* https://docs.google.com/document/d/1NAeW4Wk7I7FV0Y2tcUFvQdGMc89k2vdgSXInw8_nvCI
|
||||
*/
|
||||
Blockly.utils.global = function() {
|
||||
const utilsGlobal = function() {
|
||||
if (typeof self === 'object') {
|
||||
return self;
|
||||
}
|
||||
@@ -35,3 +32,5 @@ Blockly.utils.global = function() {
|
||||
}
|
||||
return this;
|
||||
}();
|
||||
|
||||
exports = utilsGlobal;
|
||||
|
||||
@@ -211,7 +211,7 @@ goog.addDependency('../../core/utils/colour.js', ['Blockly.utils.colour'], [], {
|
||||
goog.addDependency('../../core/utils/coordinate.js', ['Blockly.utils.Coordinate'], [], {'lang': 'es6', 'module': 'goog'});
|
||||
goog.addDependency('../../core/utils/deprecation.js', ['Blockly.utils.deprecation'], [], {'lang': 'es6', 'module': 'goog'});
|
||||
goog.addDependency('../../core/utils/dom.js', ['Blockly.utils.dom'], ['Blockly.utils.userAgent'], {'lang': 'es6', 'module': 'goog'});
|
||||
goog.addDependency('../../core/utils/global.js', ['Blockly.utils.global'], []);
|
||||
goog.addDependency('../../core/utils/global.js', ['Blockly.utils.global'], [], {'lang': 'es6', 'module': 'goog'});
|
||||
goog.addDependency('../../core/utils/idgenerator.js', ['Blockly.utils.IdGenerator'], [], {'lang': 'es6', 'module': 'goog'});
|
||||
goog.addDependency('../../core/utils/keycodes.js', ['Blockly.utils.KeyCodes'], [], {'lang': 'es6', 'module': 'goog'});
|
||||
goog.addDependency('../../core/utils/math.js', ['Blockly.utils.math'], [], {'lang': 'es6', 'module': 'goog'});
|
||||
|
||||
Reference in New Issue
Block a user