-
Notifications
You must be signed in to change notification settings - Fork 67
Proposal: documentId in tabs.query() filter #586
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
base: main
Are you sure you want to change the base?
Proposal: documentId in tabs.query() filter #586
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Very belated) thank you for the PR! There's a few extra pieces here we should polish out, but I am generally supportive of this change.
** How to Use This Template ** | ||
|
||
See [Proposal Process](proposal_process.md) for the detailed process on how to | ||
propose new APIs and use this template. Each section includes instructions on | ||
what to include. Delete the instructions for a given section once it's filled | ||
out. Remove this section once the template is filled out. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this section, per instructions
** How to Use This Template ** | |
See [Proposal Process](proposal_process.md) for the detailed process on how to | |
propose new APIs and use this template. Each section includes instructions on | |
what to include. Delete the instructions for a given section once it's filled | |
out. Remove this section once the template is filled out. |
time-of-check-time-of-use bugs. Currently extension may query tabs based on | ||
only incidental identifiers like `windowId`, `index`, and if extension has | ||
powerful `"tabs"` permission, then also `title` and `url`. Such checks are | ||
inherintly cumbersome for the extension developer, may lead to extension |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
inherintly cumbersome for the extension developer, may lead to extension | |
inherently cumbersome for the extension developer, may lead to extension |
browsing session. | ||
3. If `documentId` is provided and valid, then `tabs.query()` returns only the | ||
tab which hosts the corresponding document in a top-level context and | ||
matching all other filters. (In particular, if `documentId` corresponds to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm curious about this (the subframe behavior). It seems like being able to query which tab holds a document could be useful, independent of if it's a main frame or subframe (e.g., for querying which tab holds a particular frame that the extension may have injected into via a scripting API).
Curious for other folks' thoughts on this. Should we limit this to top frames?
tab which hosts the corresponding document in a top-level context and | ||
matching all other filters. (In particular, if `documentId` corresponds to | ||
sub-frame, an empty list is returned, matching current implementation.) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we also need to specify the behavior for other unusual cases, such as:
- prerendered documents
- cached (bfcache) documents
- documents in a (web) popup
- documents in an (extension) popup
etc
### Exposed Sensitive Data | ||
|
||
Document ids correspond to unique page loads, so a compromised or malicious | ||
extension could infer page navigations by polling `tabs.query()` untill a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extension could infer page navigations by polling `tabs.query()` untill a | |
extension could infer page navigations by polling `tabs.query()` until a |
|
||
Document ids correspond to unique page loads, so a compromised or malicious | ||
extension could infer page navigations by polling `tabs.query()` untill a | ||
particular document appears or disappers to conclude back-forth navigation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
particular document appears or disappers to conclude back-forth navigation. | |
particular document appears or disappears to conclude back-forth navigation. |
This formalizes proposal first described in #553.
Relevant links