{"action":"created","issue":{"url":"https://api.github.com/repos/tc39/ecma262/issues/226","labels_url":"https://api.github.com/repos/tc39/ecma262/issues/226/labels{/name}","comments_url":"https://api.github.com/repos/tc39/ecma262/issues/226/comments","events_url":"https://api.github.com/repos/tc39/ecma262/issues/226/events","html_url":"https://github.com/tc39/ecma262/pull/226","id":120030647,"number":226,"title":"HTML layering","user":{"login":"domenic","id":617481,"avatar_url":"https://avatars.githubusercontent.com/u/617481?v=3","gravatar_id":"","url":"https://api.github.com/users/domenic","html_url":"https://github.com/domenic","followers_url":"https://api.github.com/users/domenic/followers","following_url":"https://api.github.com/users/domenic/following{/other_user}","gists_url":"https://api.github.com/users/domenic/gists{/gist_id}","starred_url":"https://api.github.com/users/domenic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/domenic/subscriptions","organizations_url":"https://api.github.com/users/domenic/orgs","repos_url":"https://api.github.com/users/domenic/repos","events_url":"https://api.github.com/users/domenic/events{/privacy}","received_events_url":"https://api.github.com/users/domenic/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-12-02T20:35:22Z","updated_at":"2015-12-04T23:31:57Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/tc39/ecma262/pulls/226","html_url":"https://github.com/tc39/ecma262/pull/226","diff_url":"https://github.com/tc39/ecma262/pull/226.diff","patch_url":"https://github.com/tc39/ecma262/pull/226.patch"},"body":"This includes a couple fixes to help HTML and ES play well together. The second one, allowing the global this and global object to diverge, is significant. It fixes the following from HTML:\r\n\r\n> This is a willful violation of the JavaScript specification current at the time of writing (ECMAScript edition 5, as defined in section 10.4.1.1 Initial Global Execution Context, step 3). The JavaScript specification requires that the this keyword in the global scope return the global object, but this is not compatible with the security design prevalent in implementations as specified herein.\r\n\r\n/cc @annevk."},"comment":{"url":"https://api.github.com/repos/tc39/ecma262/issues/comments/162109956","html_url":"https://github.com/tc39/ecma262/pull/226#issuecomment-162109956","issue_url":"https://api.github.com/repos/tc39/ecma262/issues/226","id":162109956,"user":{"login":"anba","id":1447066,"avatar_url":"https://avatars.githubusercontent.com/u/1447066?v=3","gravatar_id":"","url":"https://api.github.com/users/anba","html_url":"https://github.com/anba","followers_url":"https://api.github.com/users/anba/followers","following_url":"https://api.github.com/users/anba/following{/other_user}","gists_url":"https://api.github.com/users/anba/gists{/gist_id}","starred_url":"https://api.github.com/users/anba/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anba/subscriptions","organizations_url":"https://api.github.com/users/anba/orgs","repos_url":"https://api.github.com/users/anba/repos","events_url":"https://api.github.com/users/anba/events{/privacy}","received_events_url":"https://api.github.com/users/anba/received_events","type":"User","site_admin":false},"created_at":"2015-12-04T23:31:57Z","updated_at":"2015-12-04T23:31:57Z","body":"> Hmm, so I didn't see you respond to my question of why you require a Realm to create objects. So I am going to assume that is OK?\r\n\r\nAs long as no intrinsics are needed, for example %ObjectPrototype% on the proto-chain. Alternatively the prototype chain needs to be updated after the intrinsics are present. (This seems to be the case [in SpiderMonkey](https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey/JSAPI_reference/JS_NewGlobalObject)).\r\n\r\n>> GetGlobalObject\r\n> \r\n> This should continue to return the global object, not the global this value.\r\n\r\nGetGlobalObject is only used in PutValue, GlobalDeclarationInstantiation directly works on the global Environment Record. Nevertheless, I don't think the difference between `this.unresolvedVariable = 0` and `unresolvedVariable = 0` matters, it's more or less the same as the difference between `this.globalVariable = 0` and `globalVariable = 0` (the former calls Set() on the globalThis value whereas the latter calls Set() on the global object)."}}