Skip to content

[docs]: add docs for setDomainPolicy#2289

Draft
seanmcguire12 wants to merge 1 commit into
mainfrom
seanmcguire/stg-2426-add-docs-for-domain-policy
Draft

[docs]: add docs for setDomainPolicy#2289
seanmcguire12 wants to merge 1 commit into
mainfrom
seanmcguire/stg-2426-add-docs-for-domain-policy

Conversation

@seanmcguire12

@seanmcguire12 seanmcguire12 commented Jun 29, 2026

Copy link
Copy Markdown
Member

why

what changed

test plan


Summary by cubic

Adds documentation for context.setDomainPolicy() and context.getDomainPolicy() to help users control HTTP(S) requests by domain across a context, with clear examples and error details. Addresses Linear STG-2426.

  • New Features
    • Documented setDomainPolicy(policy: DomainPolicy | null) and getDomainPolicy() with TypeScript signatures and a new “Domain Policy” example tab using @browserbasehq/stagehand.
    • Clarified domain-only patterns, wildcard behavior, precedence (blockedDomains over allowedDomains), scope (pages, iframes, subresources), non-HTTP scheme behavior, and how to clear the policy.
    • Updated API reference with related errors (StagehandInvalidArgumentError, StagehandSetDomainPolicyError) and V3Context/DomainPolicy interface snippets.

Written for commit 4468c7c. Summary will update on new commits.

Review in cubic

@changeset-bot

changeset-bot Bot commented Jun 29, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 4468c7c

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@mintlify

mintlify Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
stagehand 🟢 Ready View Preview Jun 29, 2026, 7:05 PM

💡 Tip: Enable Workflows to automatically generate PRs for you.

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.

1 participant