Container bundling #418
andy-haynes
started this conversation in
Implementation
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Containers are implemented via
iframe
s with asrcDoc
attribute value containing theimportmap
and the container source wrapping user RoC Components. This approach works well enough but imposes some constraints:src
property, outgoing container network requests will always have an origin ofnull
.Addressing the interpolation is ultimately a matter of building the bundle and outer HTML ahead of rendering the container
iframe
. One approach is to continue usingsrcDoc
, but pass its value as a prop to the outer Component.Utilizing
src
however would require a kind of CDN for pre-built HTML documents. An implementation using on-chain bundles in some capacity, with a robust enough fallback mechanism, could be a viable approach that doesn't violate decentralization too egregiously. This could allow developers to opt into performance benefits from caching at a much higher level than currently offered.Beta Was this translation helpful? Give feedback.
All reactions