mayu-live / framework

Mayu is a live updating server-side component-based VDOM rendering framework written in Ruby
https://mayu.live
GNU Affero General Public License v3.0
139 stars 4 forks source link

Generate custom elements from static DOM trees #61

Open aalin opened 1 year ago

aalin commented 1 year ago

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.