w3c / webdriver-bidi

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

Change originalOpener to be optional #730

Closed OrKoN closed 2 weeks ago

OrKoN commented 2 weeks ago

Since the opener Id would not be present on each context, we think it makes sense to actually define it as an optional non-nullable attribute.


Preview | Diff

OrKoN commented 2 weeks ago

@jgraham @whimboo as a follow-up to the opener ID change, we actually think it will be more convenient to declare it as optional so that null values are not sent around. WDYT?

whimboo commented 2 weeks ago

@jgraham @whimboo as a follow-up to the opener ID change, we actually think it will be more convenient to declare it as optional so that null values are not sent around. WDYT?

So only top-level browsing context will get an opener, right? Or are there also situations when the opener can be there null as well? Probably not, but given that we use the same BrowsingContextInfo struct for all browsing contexts it would make sense to set it as optional. I'm going to give @jgraham the final last word here.

OrKoN commented 2 weeks ago

So only top-level browsing context will get an opener, right? Or are there also situations when the opener can be there null as well?

null would also mean there is no opener, so not setting the attribute in that case sounds fine to me.

OrKoN commented 2 weeks ago

As discussed offline, we could return unset for child navigables but we have no strong arguments for doing it and would like to keep the spec as is.