Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

component meta-compiler #64

Open
leeoniya opened this issue Dec 27, 2023 · 1 comment
Open

component meta-compiler #64

leeoniya opened this issue Dec 27, 2023 · 1 comment

Comments

@leeoniya
Copy link
Contributor

leeoniya commented Dec 27, 2023

so here's a fun one. not really ivi specifc.

let's say i want to make an interface that renders arbitray CSV files into html tables. this doesnt fit the nice static Row template approach in js-framework-benchmark.

https://github.com/krausest/js-framework-benchmark/blob/master/frameworks/keyed/ivi/src/main.ts#L66

insteadd you end up having to do nested tr/td loops, which is not great. ideally you could dynamically compile a static Row template probably using new Function to avoid the inner td loop and rely on cloneNode of the mostly complete whole row dom.

would typings need to go out the window in this case? maybe not? 🤔

not sure if there's anything that can be done on the ivi side to help with this use case but figured i'd start a convo.

@localvoid
Copy link
Owner

ideally you could dynamically compile a static Row template probably using new Function to avoid the inner td loop and rely on cloneNode of the mostly complete whole row dom.

I think that it is possible to generate intermediate template representation without any html parsing steps and compile it with compileTemplate(ir) at runtime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants