-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
feat: Add support for server side Portals #167
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
354948d
to
a02f2f7
Compare
Resulting HTML from changed demo can be seen here: |
That looks pretty cool! A few comments from poking at at the code:
|
Thank you, kind sir 😊
Yes, I also found that out. Technically, any tag without a Astro already overrides the semantics of
The advantage of using a direct HTML tag for this is that it works even when the element was added by an UI framework component. The disadvantage is that makes such UI framework components don't work correctly on the client side. But as an alternative, users can put the entire UI framework in the portal, which will move the entire Astro Island to the new place and be hydrated there.
Yes, I mentioned that in my comment on the discussion withastro/roadmap#1032 (comment) |
Working implementation of withastro/roadmap#1032 (comment)
Still missing the tests to be ready
<portal-in to="some name">
elements are voided and their children sent to a matching portal named"some name"
<portal-out name="some name">
are replaced flatly with the children sent from<portal to="some name">
(the same effect as.replaceWith()
)<head>
,<body>
and every element with a target