Code: Select all
(function(_global) {
_global.native = _global;
})(this);
function foo() {
if (typeof native == "undefined") { // Error here
console("native undefined");
} else {
console("native: "+(typeof native));
console("include: "+(typeof native.include));
}
}
function eventStartLevel() {
setTimer("foo", 10000);
}
Code: Select all
(function(_global) {
_global.nativ = _global;
})(this);
function foo() {
if (typeof nativ == "undefined") {
console("nativ undefined");
} else {
console("nativ: "+(typeof nativ));
console("includ: "+(typeof nativ.include));
}
}
function eventStartLevel() {
setTimer("foo", 10000);
}