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

fix: support SW usage #23

Merged
merged 3 commits into from
Mar 21, 2023

Conversation

escapedcat
Copy link
Contributor

We stumbled across this issue in our PR switching the extension to manifest version 3 (MV3).

In MV3 the code is running within a service worker so no window exitsts. Not exactly sure where the document error is coming from but with thsi change it works.

What do you think? Would this work for all use cases?

src/index.ts Outdated Show resolved Hide resolved
@lnbc1QWFyb24
Copy link
Owner

Yeah globalThis seems like the way to go. Are you going to update to use that instead?

Co-authored-by: Michael Bumann <[email protected]>
@escapedcat
Copy link
Contributor Author

Done

@lnbc1QWFyb24 lnbc1QWFyb24 changed the base branch from master to develop March 21, 2023 19:43
Copy link
Owner

@lnbc1QWFyb24 lnbc1QWFyb24 left a comment

Choose a reason for hiding this comment

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

Awesome, looks good!

@lnbc1QWFyb24 lnbc1QWFyb24 merged commit e910827 into lnbc1QWFyb24:develop Mar 21, 2023
@lnbc1QWFyb24
Copy link
Owner

Hey @escapedcat I have published a beta module that you can test before I release fully. Could you let me know if that looks all good on your end?

@escapedcat escapedcat deleted the fix/sw-usage--websocket branch March 22, 2023 09:17
@escapedcat
Copy link
Contributor Author

Funny version :) Works! Thanks!

@lnbc1QWFyb24 lnbc1QWFyb24 mentioned this pull request Mar 22, 2023
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.

3 participants