w3c / webdriver-bidi

Bidirectional WebDriver protocol for browser automation
https://w3c.github.io/webdriver-bidi/
336 stars 35 forks source link

Add opener to browsing context info #664

Closed OrKoN closed 3 weeks ago

OrKoN commented 4 months ago

Issue https://github.com/w3c/webdriver-bidi/issues/516 HTML spec https://github.com/whatwg/html/pull/10402


Preview | Diff

OrKoN commented 3 months ago

@whimboo @jgraham could you please review? Do you have suggestions for a better spec text?

css-meeting-bot commented 2 months ago

The Browser Testing and Tools Working Group just discussed Add original opener to browsingContext.

The full IRC log of that discussion <AutomatedTester_> topic: Add original opener to browsingContext
<AutomatedTester_> github: https://github.com/w3c/webdriver-bidi/pull/664
<jgraham1> q+
<AutomatedTester_> orkon: there have been discussion in the bug. puppeteer allows you to see who the original opener created it.
<AutomatedTester_> ... the idea is when open the navigable that we keep the info and feed it back to webdriver bidi
<AutomatedTester_> ack next
<AutomatedTester_> ack next
<AutomatedTester_> jgraham1: 1 question is we, mozilla, would need to check how easy it is to implement as we may/may not have the info accessible to us
<AutomatedTester_> ... in principle the idea seems ok but the patch does look a little scary and we may need to update the html spec
<AutomatedTester_> ... and we should avoid the hand wavey in this spec
<AutomatedTester_> q?
<orkon> q+
<whimboo> q+
<AutomatedTester_> ack next
<AutomatedTester_> orkon: the html spec changes should be easy but the opener id is discarded quite quickly
<AutomatedTester_> ... so if firefox can implement it then we can do the hgtml spec changes easily
<AutomatedTester_> ... and we will prepate patches
<AutomatedTester_> ack nexty
<AutomatedTester_> ack next
<AutomatedTester_> whimboo: what happens in the case of no opener or we open the window what happens?
<AutomatedTester_> orkon: if the no opner is used then the page wouldnt see it but devtools/bidi woudl still have access to it
<AutomatedTester_> q?
OrKoN commented 2 months ago

@whimboo could you please check if the implementation of this is feasible in Firefox? If it is, I will proceed with a PR to the HTML spec to store the original opener ID.

whimboo commented 2 months ago

@whimboo could you please check if the implementation of this is feasible in Firefox? If it is, I will proceed with a PR to the HTML spec to store the original opener ID.

We discussed with DOM folks and as of now there is no such ability in Gecko. I've filed https://bugzilla.mozilla.org/show_bug.cgi?id=1891670 to get it added but it might take some time.

whimboo commented 4 weeks ago

We discussed with DOM folks and as of now there is no such ability in Gecko. I've filed https://bugzilla.mozilla.org/show_bug.cgi?id=1891670 to get it added but it might take some time.

There is a patch available that will hopefully land soon. So at least from our side it should no longer be a blocker to get this feature added to WebDriver BiDi.

OrKoN commented 3 weeks ago

@whimboo @jgraham I have updated the PR so that it relies on the direct integration with the HTML spec. PTAL and if it looks good I can start finalizing the HTML spec change.

whimboo commented 2 weeks ago

@OrKoN are you going to create or update some wpt tests for this new feature?

Lightning00Blade commented 2 weeks ago

@whimboo I am currently working on the test for this feature.