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

No document object in background.js #191

Open
tsarpaul opened this issue Aug 16, 2021 · 0 comments
Open

No document object in background.js #191

tsarpaul opened this issue Aug 16, 2021 · 0 comments

Comments

@tsarpaul
Copy link

I'm trying to use the metamask provider from a background script in a chrome extension, but background scripts have no document object so I'm being thrown a "document is not defined" error. This is due to this line:

if (document.readyState === 'complete') {

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

No branches or pull requests

1 participant