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

Handling fallback content for portals #23

Open
lucasgadani opened this issue Aug 14, 2018 · 5 comments
Open

Handling fallback content for portals #23

lucasgadani opened this issue Aug 14, 2018 · 5 comments
Labels
spec todo A nitty-gritty detail that needs spec work

Comments

@lucasgadani
Copy link
Collaborator

One of the issues that were brought up in the Chromium intent thread (https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/SgsbpO08AeI) was how to handle fallback content.

I haven't given this a lot of thought yet, but this is something we should consider carefully as we write the spec, since it's important to interop with browser that may not support portals.

@domenic
Copy link
Collaborator

domenic commented May 8, 2020

I think this is pretty straightforward. The parser does nothing special with <portal>, so in browsers that don't support it, it gets treated like <asdf>, and so the contents between <portal> and </portal> show up as fallback.

In browsers that do support it, we need a bit of spec work to state that the children are hidden. This ties in to the general spec work needed to state how portals are rendered.

@domenic domenic added the spec todo A nitty-gritty detail that needs spec work label May 8, 2020
@domenic
Copy link
Collaborator

domenic commented Aug 25, 2020

Should we display fallback content in cases where the portal fails to load, e.g. portals inside nested browsing contexts?

@kjmcnee
Copy link
Collaborator

kjmcnee commented Aug 25, 2020

By failing to load, are we talking about both eligibility of the host (e.g. no nested contexts) and conditions in the portal context (e.g. no network), or just the former?

@domenic
Copy link
Collaborator

domenic commented Aug 25, 2020

Good question. I think we need to consider both. In particular, do we want portals to be able to display error pages? Or should they get closed when that would otherwise show up?

This is interesting because, e.g., for iframes, navigating to a blob URL will display an error page. We've chosen instead to close the portal, but now we have to decide where to use closing and where to use error pages.

@jeremyroman
Copy link
Collaborator

I admit to not being super invested in the idea of fallback content, but I would think that the simplest rule is probably that if there's no browsing context we render fallback content instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
spec todo A nitty-gritty detail that needs spec work
Projects
None yet
Development

No branches or pull requests

4 participants