Skip to content
This repository has been archived by the owner on Jan 25, 2022. It is now read-only.

self is not defined #153

Closed
shanejonas opened this issue Feb 19, 2020 · 0 comments · Fixed by #164
Closed

self is not defined #153

shanejonas opened this issue Feb 19, 2020 · 0 comments · Fixed by #164

Comments

@shanejonas
Copy link

Describe the bug
I have a nested dependency that relies on isomorphic-fetch, which i'm unable to load inside SES due to self not being defined.

To Reproduce
Steps to reproduce the behavior:

  1. Use snaps-cli to init a new project
  2. Add const supported = "URLSearchParams" in self; to the code
  3. See error

Expected behavior
As defined in the spec, self should exist and be the window object.

The window, frames, and self attributes' getters must return this Window object's relevant Realm.[[GlobalEnv]]'s EnvironmentRecord's [[GlobalThisValue]].

Source: https://html.spec.whatwg.org/multipage/window-object.html#dom-self

Screenshots
image
image

Browser details (please complete the following information):

  • OS: OS X
  • Browser: chrome
  • MetaMask Version: develop

Additional context
JakeChampion/fetch#657 (comment)

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 a pull request may close this issue.

1 participant