"[DEP0016] DeprecationWarning: 'GLOBAL' is deprecated, use 'global'"
@@ -58,7 +58,7 @@ def link(input_paths, output_path, dirs, version = None):
prolog = ""
if not version is None:
prolog += 'var buildVersion = %s;\n' % encode_to_js_string(version)
- prolog += "var GLOBAL = this;\n"
+ prolog += "var global = this;\n"
prolog += "var imports = {};\n"
prolog += 'function require(module){return imports[module];}\n'
out.write(prolog)
@@ -26,7 +26,7 @@ var ModuleGenerator = Class.extend({
var importName = this.__importDir ? this.__importDir + "/" + name
: name;
result += "var " + CodeGenerator.mangleId(alias) + " = " + (name == "JS"
- ? "GLOBAL"
+ ? "global"
: "require(\"" + importName + ".js\")") + ";\n";
}
return result;
@@ -1,7 +1,7 @@
"use strict";
if (typeof Uint16Array == "undefined"){
- GLOBAL.Uint16Array = function(length){
+ global.Uint16Array = function(length){
Array.call(this, length);
for(var i = 0; i < length; ++i)
this[i] = 0;