diff --git a/src/base/single/input/file.js b/src/base/single/input/file.js index 50ec58bdc..802e8472f 100644 --- a/src/base/single/input/file.js +++ b/src/base/single/input/file.js @@ -97,7 +97,7 @@ split = "onabort.onerror.onloadstart.onprogress".split("."), length = split.length, CRLF = "\r\n", - xhr = this.XMLHttpRequest ? new XMLHttpRequest : new ActiveXObject("Microsoft.XMLHTTP"), + xhr = XMLHttpRequest ? new XMLHttpRequest : new ActiveXObject("Microsoft.XMLHTTP"), sendFile; // FireFox 3+, Safari 4 beta (Chrome 2 beta file is buggy and will not work) diff --git a/src/core/0.foundation.js b/src/core/0.foundation.js index 067178cbd..ea69e97a9 100644 --- a/src/core/0.foundation.js +++ b/src/core/0.foundation.js @@ -4,7 +4,7 @@ /** * 初始化BI对象 */ -_global = undefined; +var _global = undefined; if (typeof window !== "undefined") { _global = window; } else if (typeof global !== "undefined") { @@ -14,6 +14,11 @@ if (typeof window !== "undefined") { } else { _global = this; } + +if (_global) { + _global._global = _global; +} + if (_global.BI == null) { _global.BI = {prepares: []}; } diff --git a/src/core/2.base.js b/src/core/2.base.js index 16a4a9f70..4a2a2df68 100644 --- a/src/core/2.base.js +++ b/src/core/2.base.js @@ -3,20 +3,6 @@ * Create By GUY 2014\11\17 * */ -_global = undefined; -if (typeof window !== "undefined") { - _global = window; -} else if (typeof global !== "undefined") { - _global = global; -} else if (typeof self !== "undefined") { - _global = self; -} else { - _global = this; -} -if (!_global.BI) { - _global.BI = {}; -} - !(function (undefined) { var traverse = function (func, context) { return function (value, key, obj) {