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

Consider using globalThis in harness code #31996

Open
Ms2ger opened this issue Dec 10, 2021 · 2 comments
Open

Consider using globalThis in harness code #31996

Ms2ger opened this issue Dec 10, 2021 · 2 comments

Comments

@Ms2ger
Copy link
Contributor

Ms2ger commented Dec 10, 2021

We've historically used self, as that's available in all Web globals. We're now starting to add tests for ShadowRealms, which don't support self, but now globalThis exists. We could change the harness code to support both - maybe even with a fallback to self to keep pre-2020 browsers working.

@jimmywarting
Copy link
Contributor

i say just rip the bandaid of.
switch to using globalThis. otherwise use a polyfill. self.globalThis = self

@ptomato
Copy link
Contributor

ptomato commented Oct 10, 2024

As of the current state of whatwg/html#9893 we do propose to have self in ShadowRealms.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants