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

Export "create a new top-level browsing context"? #8449

Closed
alancutter opened this issue Oct 28, 2022 · 6 comments
Closed

Export "create a new top-level browsing context"? #8449

alancutter opened this issue Oct 28, 2022 · 6 comments

Comments

@domenic
Copy link
Member

domenic commented Oct 28, 2022

Well, maybe. In #6315, scheduled to land on Monday, we're largely replacing the top-level browsing context concept with "top-level traversable". What you've provided is a good list of specs that we'll need to help you all update.

I'll add in the export to that PR, and in particular I'll ensure "create a new top-level traversable"'s arguments are both optional.

@domenic
Copy link
Member

domenic commented Oct 28, 2022

I've added create a fresh top-level traversable, which is exported and takes no arguments.

There's a remaining problem where none of those specs pass a sourceDocument to the new navigate. Which makes sense, because there is no source... Hmm. We could go a few routes here:

  1. Require calling specs to understand what to do here, which is to pass the traversable's active document as the source document. I.e., treat the traversable as if it is navigating itself, from the initial about:blank document.

  2. Generally allow no sourceDocument to be passed in to navigate. In this case we can use the current active document of the navigable as the sourceDocument automatically.

  3. Have "create a fresh top-level traversable" also take a URL and optional POST resource argument, and let it wrap up this process.

(1) is annoying but most flexible. (2) is dangerous; it'll be too easy for people to forget to pass a sourceDocument when they really need to do so. (3) is most appealing, but it doesn't seem to work well for https://wicg.github.io/web-app-launch/#preparing-a-new-web-app-launch-client which has an intermediate step .

How important is that intermediate step? Could it happen after navigation has started?

@alancutter
Copy link
Author

Oh awesome, thanks for rationalising this with what's going on in WHATWG land, I would have had no idea.

How important is that intermediate step? Could it happen after navigation has started?

Yep, it can happen after navigation. It mainly applies fairly cosmetic things like window decorations.

@domenic
Copy link
Member

domenic commented Oct 28, 2022

OK, sweet! So after that is merged and indexed by the various spec cross-referencing databases (say, Tuesday-ish), you should be able to replace all of those with [=create a fresh top-level traversable=] given |url|. The https://w3c.github.io/web-share-target/#launching-the-web-share-target case will need a bit more work to move from constructing a request to instead construct a POST resource.

@alancutter
Copy link
Author

The https://w3c.github.io/web-share-target/#launching-the-web-share-target case will need a bit more work to move from constructing a request to instead construct a POST resource.

Can [=create a fresh top-level traversable=] take a POST resource instead of a URL for that case?

@domenic
Copy link
Member

domenic commented Oct 31, 2022

It will take a URL and an optional POST resource: https://whatpr.org/html/6315/document-sequences.html#create-a-fresh-top-level-traversable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants