1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
|
function getInfo() {
console.log("getInfo from global");
}
function getGlobal() {
console.log("global");
}
var A = {
getInfo: function () {
console.log("getInfo from A");
},
getName: function() {
console.log("A");
},
B: {},
monitor : 24
};
with(A) {
getInfo();
// try here
getGlobal();
getName();
B.getName = function () {
console.log("B");
this.c // issue 232798
};
B.createBuf = function () {
console.log("create buf");
};
}
A.getName();
A.B.getName();
|