This page tests what happens when a getter / setter on the window object conflicts with another property or declared variable. | |
window.x is: 1 | |
typeof window.__lookupGetter__("x") is: function | |
window.x is: 2 | |
typeof window.__lookupSetter__("x") is: function | |
window.y is: window.y __getter__ | |
typeof window.__lookupGetter__("y") is: function | |
window.y is: 2 | |
typeof window.__lookupSetter__("y") is: undefined | |
window.z __setter__ called | |
typeof window.__lookupSetter__("z") is: undefined | |