Closed Bug 1891670 Opened 6 months ago Closed 4 months ago

Enable access to the "opener" property within CanonicalBrowsingContext, even if the window was originally opened with "noopener"

Categories

(Core :: DOM: Core & HTML, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
129 Branch
Tracking Status
firefox129 --- fixed

People

(Reporter: whimboo, Assigned: farre)

References

(Regressed 1 open bug)

Details

Attachments

(1 file)

For automation through WebDriver BiDi, we are seeking the capability to access the opener property of a browser window or tab, even if it was initially opened with the noopener attribute. This access should be restricted to privileged code running in the parent process, not accessible to any content JavaScript. The desired implementation would involve making this value retrievable via the CanonicalBrowsingContext.

An example scenario is within Puppeteer, where the browsingContext.getTree command from WebDriver BiDi is utilized to gather details about all open windows, tabs, and frames. In this context, having the ability to determine which specific window opened another window would be valuable.

Having such a property would be a big help for us to gain better support for Puppeteer.

Edgar, who would be an appropriate contact to provide further insights into the necessary steps for achieving this? Thanks

Flags: needinfo?(echen)

Perhaps we could reuse CanonicalBrowsingContext::GetCrossGroupOpenerID() and expose it to chrome JS, https://searchfox.org/mozilla-central/rev/e69f323af80c357d287fb6314745e75c62eab92a/docshell/base/CanonicalBrowsingContext.h#92-96? :farre might know better.

Flags: needinfo?(echen) → needinfo?(afarre)

This might work, the docs indicates that this is intended for downloads, so if we expand it's use we should make sure to also update docs and add tests.

Flags: needinfo?(afarre)
Assignee: nobody → afarre
Status: NEW → ASSIGNED
Pushed by afarre@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4a388b88f565 Expose crossGroupOpener on CanonicalBrowsingContext. r=dom-core,tabbrowser-reviewers,peterv
Regressions: 1903105
Status: ASSIGNED → RESOLVED
Closed: 4 months ago
Resolution: --- → FIXED
Target Milestone: --- → 129 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: