-
Notifications
You must be signed in to change notification settings - Fork 66
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
Replacement navigation and about:blank #214
Comments
Although I use "consistency" as an argument here, I don't think we should do a replacement navigation if the portal is activated before document load, which is different to how But the use-case there seems to be JS "redirects", and I don't think it makes sense to use portals for that. |
@kjmcnee because history This seems to me like a special case that was added basically because a browsing context always comes with an I'm less convinced this argument applies to portal activation (why wouldn't you just navigate ordinarily? the existing document is presumably blank so why keep that rendered instead of the navigation destination?), but honestly I would expect this to happen ~never so I don't know that I feel strongly. |
I'm mostly thinking of future cases where it might be possible to move a portal to a newly-created window and activate it. But there's a lot of stuff to solve before we get there. Maybe we'll be able to change behaviour later? But I'm a little worried it'll be a web compat issue by then. |
I don't quite understand the OP here. What is the proposal? I very much like how portals do not have the horrible complexity that comes with the initial |
The pattern is:
Can the user now click back to go to This might be a little related to #215, where we create the idea of "pop-out" portals, where navigating back to |
Oh, very interesting. So this is about history in the host browsing context, and how activation affects it. The guest browsing context stays nice and simple and clean. In that case I am less concerned with which we choose. I guess reducing the number of cases of "replacement enabled" seems slightly simpler, but if there were a real use case where it might matter, we could do it. I currently agree with Jeremy that this seems very unlikely to happen in practice, which makes me inclined toward more simplicity, but I can see how #215 might impact that. |
about:blank cannot host a portal (https://wicg.github.io/portals/#htmlportalelement-may-have-a-guest-browsing-context), so this shouldn't be possible. I think we'll want an option for the activate method to enable replacement to offer the same capability as location object navigation, but we don't have to worry about special casing about:blank. |
Interesting! Why is Actually, there might be a privacy issue here. If a portal can be put in a JS-controlled window, then data can be transferred via the resize events. Excluding |
Ah, I see, because it could adopt |
The privacy issue is tracked in #216. The fact that |
From https://html.spec.whatwg.org/multipage/history.html#location-object-navigate:
Should we do the same with portals?
This covers the case where
window.open
is called, and a portal is created (or moved?) within the new window, and activated. Should that be a new session entry?I'm leaning towards "replace" to avoid a new session entry. This seems consistent, and paves the way for creating pop-out portals.
The text was updated successfully, but these errors were encountered: