Revert "A better fix for the IE bug. Rather than introduce the secondary global and the eval, just refer to the actual global object (works in any javascript env)."

This reverts commit d40619aca0.
This commit is contained in:
Ross Boucher
2010-02-17 17:37:46 -08:00
parent 81b72fc571
commit a38be80a86
+21 -2
View File
@@ -1,8 +1,27 @@
var ObjectiveJ = { };
var global = { },
ObjectiveJ = { };
(function (global, exports, namespace)
{
var GLOBAL_NAMESPACE = namespace;
#include "Includes.js"
})((function(){return this;}).call(null), ObjectiveJ);
})(global, ObjectiveJ, window);
var hasOwnProperty = Object.prototype.hasOwnProperty;
// If we can't trust the host object, don't treat it as global
// and fall back to inferred global through eval. In IE this
// make a difference.
if (window.window !== window)
{
for (key in global)
if (hasOwnProperty.call(global, key))
eval(key + " = global[\"" + key + "\"];");
}
else
{
for (key in global)
if (hasOwnProperty.call(global, key))
window[key] = global[key];
}