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

Gloo net fetch in worker #253

Merged
merged 3 commits into from Nov 4, 2022

Conversation

flosse
Copy link
Contributor

@flosse flosse commented Sep 7, 2022

I'm trying to use gloo-net in a web extension with manifest V3 but this does not work because of #201.
Fortunately @cdata found a workaround 😃
That at least avoids a panic but my service worker of the web extension does not have the DedicadedWorkerGlobalScope so I changed it to WorkerGlobalScope because as far as I know a DedicadedWorkerGlobalScope is a specialization of WorkerGlobalScope.

What do you think?

Copy link
Collaborator

@hamza1311 hamza1311 left a comment

Choose a reason for hiding this comment

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

Can we add test cases for this?

@futursolo do you know if it's possible to run test in gloo-worker?

crates/net/src/http/mod.rs Outdated Show resolved Hide resolved
@futursolo
Copy link
Collaborator

Can we add test cases for this?

@futursolo do you know if it's possible to run test in gloo-worker?

You can send back the result of tests run within workers when code is run normally within a worker.
But you cannot use #[wasm_bindgen_test] or assert*! in a worker.

@flosse
Copy link
Contributor Author

flosse commented Nov 4, 2022

@hamza1311 is there something I can do to make this PR merged?

@hamza1311
Copy link
Collaborator

Sorry, took me a while to get to this. It looks good! Thanks for the PR (and the wait)

@hamza1311 hamza1311 merged commit b8f969f into rustwasm:master Nov 4, 2022
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.

None yet

4 participants