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

DNR: Add excludedTopFrameDomains (and topFrameDomains) #762

Open
ghostwords opened this issue Feb 10, 2025 · 3 comments
Open

DNR: Add excludedTopFrameDomains (and topFrameDomains) #762

ghostwords opened this issue Feb 10, 2025 · 3 comments
Labels
supportive: chrome Supportive from Chrome supportive: firefox Supportive from Firefox supportive: safari Supportive from Safari topic: dnr Related to declarativeNetRequest

Comments

@ghostwords
Copy link

ghostwords commented Feb 10, 2025

In addition to excludedInitiatorDomains (and initiatorDomains). Having excludedTopFrameDomains (and topFrameDomains) would solve the problem of excluding (or including) requests based specifically on the top-level document's domain, not the initiator's (immediate parent frame's) domain.

excludedTopFrameDomains will work just like excludedInitiatorDomains with the one difference being that excludedTopFrameDomains compares against the top-level frame's domain instead of the immediate parent frame's domain.

Developers should be able to feature detect the availability of excludedTopFrameDomains, so that they can use it when it is available and fall back on excludedInitiatorDomains otherwise.

For a real world example of what this would solve, see EFForg/privacybadger#3048 (comment)

@github-actions github-actions bot added needs-triage: chrome Chrome needs to assess this issue for the first time needs-triage: firefox Firefox needs to assess this issue for the first time needs-triage: safari Safari needs to assess this issue for the first time labels Feb 10, 2025
@oliverdunk
Copy link
Member

Chrome is supportive of this. It seems like a compelling use case and a good proposal to achieve the desired behavior.

@oliverdunk oliverdunk added supportive: chrome Supportive from Chrome and removed needs-triage: chrome Chrome needs to assess this issue for the first time labels Feb 10, 2025
@Rob--W Rob--W added supportive: safari Supportive from Safari supportive: firefox Supportive from Firefox topic: dnr Related to declarativeNetRequest and removed needs-triage: safari Safari needs to assess this issue for the first time needs-triage: firefox Firefox needs to assess this issue for the first time labels Feb 13, 2025
@Rob--W
Copy link
Member

Rob--W commented Feb 13, 2025

What is the expected behavior if the top level is about:blank, e.g. a popup opened by https://example.com ?

@ghostwords
Copy link
Author

ghostwords commented Feb 13, 2025

We should fall back on the initiator in this edge case? Maybe we also want matchAboutBlank and matchOriginAsFallback properties? #673 seems related.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
supportive: chrome Supportive from Chrome supportive: firefox Supportive from Firefox supportive: safari Supportive from Safari topic: dnr Related to declarativeNetRequest
Projects
None yet
Development

No branches or pull requests

3 participants