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

Proposal: unique frameIds across windows and tabs #90

Open
carlosjeurissen opened this issue Sep 30, 2021 · 1 comment
Open

Proposal: unique frameIds across windows and tabs #90

carlosjeurissen opened this issue Sep 30, 2021 · 1 comment
Labels
proposal Proposal for a change or new feature

Comments

@carlosjeurissen
Copy link
Contributor

carlosjeurissen commented Sep 30, 2021

Background

  1. Proposed in request: allow to retrieve a frameID from an <iframe> element #12, is the ability to be able to get a frameId based on the windowObject of a frame. See also: Publish minutes of 2021-09-30 meeting #89
  2. Proposed in Proposal: Provide a secure drop-in replacement for window.postMessage() #77 (comment), is the ability to send messages to frames as alternative to window.postMessage which has many potential security issues.
  3. Proposed in Proposal: scripting.executeScript without specifying tabId #91, is the ability to run executeScript and insertCSS with just specifying the frameId without specifying the tabId. As the tabId might not always be available.

Proposal

The above three proposals all very much rely on frameIds to be unique across windows and tabs. Making them uniquely identifiable. This seems to already be the case in some browsers. Seems Firefox and Chromium have unique frameIds. Yet it's very welcome to have this confirmed for all browsers, Firefox, Chromium, Edge, Safari, Naver Whale and others.

@carlosjeurissen carlosjeurissen changed the title Unique frame ids Confirmation: Unique frame ids Oct 1, 2021
@carlosjeurissen carlosjeurissen changed the title Confirmation: Unique frame ids Confirmation: unique frame ids across windows and tabs Oct 1, 2021
@carlosjeurissen carlosjeurissen changed the title Confirmation: unique frame ids across windows and tabs Proposal: unique frameIds across windows and tabs Oct 1, 2021
@carlosjeurissen
Copy link
Contributor Author

As mentioned in the past by Google, we can consider making the frameId a random integer for security reasons. See:
#12 (comment)

In addition, I was wondering if there is a specific reason why the main_frame is always 0? If we let it be part of the unique frameIds this would also help with the mentioned proposals.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proposal Proposal for a change or new feature
Projects
None yet
Development

No branches or pull requests

2 participants