I recently did an experiment with this in rdom. Works pretty well, assigning child nodes via slots seems pretty fast..
Mayu should be able to render custom elements server side somehow. It could probably spit out <template>-tags as it goes along, or maybe even better, have the browser download .js-files for each template.. with unique names that can be cached.
UPDATE: Did some experiments, turns out it's not as easy as I thought if it should render the entire thing to HTML on the initial request. rdom doesn't do this so it was easier there. Using the declarative Shadow DOM would help but it's not supported in Firefox.
I recently did an experiment with this in rdom. Works pretty well, assigning child nodes via slots seems pretty fast..
Mayu should be able to render custom elements server side somehow. It could probably spit out
<template>
-tags as it goes along, or maybe even better, have the browser download.js
-files for each template.. with unique names that can be cached.UPDATE: Did some experiments, turns out it's not as easy as I thought if it should render the entire thing to HTML on the initial request. rdom doesn't do this so it was easier there. Using the declarative Shadow DOM would help but it's not supported in Firefox.