-
Notifications
You must be signed in to change notification settings - Fork 67
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
Prerendering and opening links in new windows #215
Comments
There's nothing that fundamentally prevents us from opening the prerendered page in a new window, I think; we just don't have APIs for it. |
It'd be good to figure out a rough idea of how to do that, just to reduce the change that we accidentally do something that prevents it later. But if it's the main pitch of portals, it feels like we should do something about it sooner. |
It seems this could be partially solved by #174. If the default click behavior for portals is to activate them, then the default middle-click behavior for portals could be to activate them into a new window. Similarly for the default right-click-open-in-new-window-menu-item behavior. That is, if we introduce the concept that users can trigger a portal activation without page author code getting in the way via #174, it seems like it would be pretty easily extensible to activate-into-new-window. Separately, this could just be something like |
@lucasgadani fyi +1 to @domenic's general comments above. I would note that from Chromium's implementation details moving a portal contents into a new window may become trickier as we move away from a single |
Maybe. Although, it's tricky in cases where the user doesn't click on the portal itself, eg a link on Google search.
This misses things that are browser specific, like middle-click's "open in background tab", and the recent tab-grouping stuff in Canary. |
Possible solutions off the top of my head: Some form of navigate event, where the developer can provide a portal to use for the navigation. Previously I've pitched the navigate event as something that only happens on navigations where the user hasn't provided a preference on how the navigation should happen, but that isn't the case here. Something like I guess we'd also need to fire an event on the portal to indicate that the inner document is now gone. |
Yeah, I've been thinking along similar lines. Between the two I think I'd prefer the latter, and I think it aligns reasonably well with viewing a |
An aggregator like Reddit/Google Search could use portals to prerender content for quick access. However, in the current design, if I open a link in a new tab the prerender isn't used. So, as a user I've paid the bandwidth cost, but get none of the benefit.
If prerendering is a primary use-case, are we missing something fundamental?
The text was updated successfully, but these errors were encountered: