Skip to content
This repository has been archived by the owner on Oct 2, 2019. It is now read-only.

Clarify distinction between globalThis and the global object #44

Merged
merged 1 commit into from Apr 18, 2019
Merged

Clarify distinction between globalThis and the global object #44

merged 1 commit into from Apr 18, 2019

Conversation

mathiasbynens
Copy link
Member

This also makes the motivation for the name "globalThis" more clear.

This also makes the motivation for the name "globalThis" more clear.
@@ -36,9 +36,50 @@ var getGlobal = function () {

## HTML and the `WindowProxy`

In HTML 5, the global object is separated into the `Window` and the `WindowProxy`. New attributes are set on the `Window`, but top-level this has the identity of the `WindowProxy`. The `WindowProxy` forwards all object operations to the underlying `Window`, but as the page changes, the global object maintains the same identity while the underlying `Window` is swapped out.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Side note: it's "HTML5", not "HTML 5". But it's 2019 so let's just call it "HTML".

@ljharb ljharb merged commit 7950c30 into tc39:master Apr 18, 2019
@mathiasbynens mathiasbynens deleted the patch-1 branch April 18, 2019 07:58
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants