wpt icon indicating copy to clipboard operation
wpt copied to clipboard

Consider using `globalThis` in harness code

Open Ms2ger opened this issue 4 years ago • 2 comments

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.

Ms2ger avatar Dec 10 '21 08:12 Ms2ger

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

jimmywarting avatar May 15 '23 12:05 jimmywarting

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

ptomato avatar Oct 10 '24 23:10 ptomato