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

feat: add allow/block serviceWorkers option #14714

Merged
merged 4 commits into from
Jun 8, 2022

Conversation

rwoll
Copy link
Member

@rwoll rwoll commented Jun 8, 2022

Adds cross-browser support for easily allowing/blocking Service Workers via a Context option.

Includes plumbing for Playwright Test's use.

Resolves #14522.

Relates #1090.
Supercedes #14321.

packages/playwright-core/src/server/browserContext.ts Outdated Show resolved Hide resolved
packages/playwright-test/src/index.ts Outdated Show resolved Hide resolved
@rwoll rwoll merged commit 85d0371 into microsoft:main Jun 8, 2022
orenyomtov added a commit to orenyomtov/playwright that referenced this pull request Jan 4, 2023
In the implementation of adding the serviceWorkers option (microsoft#14714), the default value was not properly set.

This PR fixes the workaround needed here:
microsoft#15684 (comment)

As you can see, it is documented to default to `"allow"`:
https://github.com/rwoll/playwright/blob/main/docs/src/api/params.md#context-option-service-worker-policy

Signed-off-by: Oren <orenyomtov@users.noreply.github.com>
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.

[Feature] Disable Service Workers
3 participants