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

Phase II template bindings research #4

Open
VJAI opened this issue Sep 19, 2021 · 0 comments
Open

Phase II template bindings research #4

VJAI opened this issue Sep 19, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@VJAI
Copy link
Owner

VJAI commented Sep 19, 2021

Analysis and research on supporting template bindings.

ex.

@element('hello-world', `<div [class]="cssClasses"><h1>{message}</h1></div>`)
class HelloWorld extends TinyElement {

    cssClasses = "banner";

    @input()
    message;    
}

Create separate binding classes for each type of binding class, if, style etc.

We need to create a simple TemplateParser based on native DOMParser available in browser. Which should parse the html template string and convert into an object model. Next, from the template object model and the component state we need to create the latest DOM model. Finally, compare the latest dom model with the older one and create the batch operations we need to perform on DOM.

@VJAI VJAI added the enhancement New feature or request label Sep 19, 2021
@VJAI VJAI mentioned this issue Sep 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant