Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Portals, as provided in React with
React.createPortal
, are a first-class way to render children into a DOM node that exists outside the DOM hierarchy of the parent component.There are two major properties an implementation should have.
This POC contains the primitive
VNode::VPortal
andVPortal::create
to implement components that for example mount their children into an iframe (have to wait for the document to be ready), or to attach a shadow dom to an element. Yet, the implementation as components is not contained in this PR. Not sure where this part belongs, actually, probably in third-party libs or utils.Fixes #1992
Checklist
cargo make pr-flow
PS:
I'm runningAfter runningcargo make pr-flow
and getting erros comparing compile-errs inyew-macro/tests/html_macro
, everything else works, including the tests in this PR. Can someone tell me what I might be doing wrong?cargo update
, this also works locally.