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
Uh oh!
There was an error while loading. Please reload this page.
-
Containers are implemented via
iframes with asrcDocattribute value containing theimportmapand the container source wrapping user RoC Components. This approach works well enough but imposes some constraints:srcproperty, 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
srchowever 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