On Nov 25, 2014, at 8:53 AM, Anne van Kesteren wrote: > On Tue, Nov 25, 2014 at 5:45 PM, Allen Wirfs-Brock > <[email protected]> wrote: >> I'm simply trying to understand what what is meant when HTML talks about >> changing the global object/realm/etc. > > onload = function() { > self.x = "test" > console.log(self.x) // "test" > document.open("text/html") > console.log(self.x) // undefined > } >
This example does tell me anything useful because 'self' is just a upbinding of the function. Even if I assume that 'self' is a property of the global object, the example isn't interesting because the open function, if it was created in the same Realm as the function, would also have access to the same global object and could modify the object that is the value of its 'self' property. Allen _______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

