Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add globalThis definition to runtime #1534

Merged
merged 1 commit into from
Jan 16, 2019
Merged

Conversation

kitsonk
Copy link
Contributor

@kitsonk kitsonk commented Jan 16, 2019

The globalThis proposal has reached Stage 3: https://github.com/tc39/proposal-global and has been in V8 for a while now.

This PR adds it to the runtime type library for Deno so that users can access it. It shares the same interface as window and globalThis === window without any additional runtime code to be added.

I tried to replace our use of globalEval with globalThis in the runtime code, but it appears that when snapshotting, globalThis is not available for some reason.

tests/globalThis.test Outdated Show resolved Hide resolved
@kitsonk
Copy link
Contributor Author

kitsonk commented Jan 16, 2019

@ry updated and the failure seems to be a transient Travis issue.

Copy link
Member

@ry ry left a comment

Choose a reason for hiding this comment

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

LGTM

@ry ry merged commit 00b655a into denoland:master Jan 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants