const freeSelf = typeof self == 'object' && self !== null && self.Object === Object && self
console.log(freeSelf)
const g = Function('return this')();
console.log("this " + g)
console.log(window === window.self)
console.log("Is g === self? " + (g === self))
Output:
Window this [object Window] true Is g === self? true
No comments:
Post a Comment