mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-09-13 14:11:27 +00:00
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:
@@ -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];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user