This commit is contained in:
Bruno Windels 2020-04-29 10:10:33 +02:00
parent 8bde627cdb
commit f4bb609ab6
2 changed files with 11 additions and 2 deletions

View file

@ -0,0 +1,3 @@
use mock view models or even a mock session to render different states of the app in a static html document, where we can somehow easily tweak the css (just browser tools, or do something in the page?) how to persist css after changes?
Also dialogs, forms, ... could be shown on this page.

View file

@ -19,8 +19,7 @@ function objHasFns(obj) {
- one way binding of text values (child fn value) - one way binding of text values (child fn value)
- refs to get dom nodes - refs to get dom nodes
- className binding returning object with className => enabled map - className binding returning object with className => enabled map
missing: - add subviews inside the template
- create views
*/ */
export class TemplateView { export class TemplateView {
constructor(value, render = undefined) { constructor(value, render = undefined) {
@ -288,3 +287,10 @@ for (const tag of TAG_NAMES) {
} }
// TODO: should we an instance of something else than the view itself into the render method? That way you can't call template functions outside of the render method. // TODO: should we an instance of something else than the view itself into the render method? That way you can't call template functions outside of the render method.
// methods that should be on the Template:
// el & all the tag names
// view
// if
// createTemplate
//
// all the binding stuff goes on this class, we just set the bindings on the members of the view.