Anne van Kesteren (2014-11-25T16:53:20.000Z)
On Tue, Nov 25, 2014 at 5:45 PM, Allen Wirfs-Brock
<allen at wirfs-brock.com> 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
}


-- 
https://annevankesteren.nl/
d at domenic.me (2014-12-04T22:35:29.447Z)
On Tue, Nov 25, 2014 at 5:45 PM, Allen Wirfs-Brock <allen at wirfs-brock.com> wrote:
> I'm simply trying to understand what what is meant when HTML talks about changing the global object/realm/etc.

```js
onload = function() {
  self.x = "test"
  console.log(self.x) // "test"
  document.open("text/html")
  console.log(self.x) // undefined
}
```