Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion base.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ function Refs(view) {
if (target[name]) {
return target[name];
}
el = view.el.querySelector(`[ref=${name}]`);
const el = view.el.querySelector(`[ref=${name}]`);
target[name] = el;
return el;
}
Expand Down
8 changes: 5 additions & 3 deletions bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ function Refs(view) {
if (target[name]) {
return target[name];
}
el = view.el.querySelector(`[ref=${name}]`);
const el = view.el.querySelector(`[ref=${name}]`);
target[name] = el;
return el;
}
Expand Down Expand Up @@ -191,12 +191,13 @@ class ListView extends __WEBPACK_IMPORTED_MODULE_0__base__["a" /* default */] {
}

render() {
return this.tmpl`
this.el = this.tmpl`
<div class="listing">
LISTING:
${this.items.map(item => new __WEBPACK_IMPORTED_MODULE_1__item__["a" /* default */](item).render())}
</div>
`;
return this.el;
}

}
Expand Down Expand Up @@ -1456,12 +1457,13 @@ class ItemView extends __WEBPACK_IMPORTED_MODULE_0__base__["a" /* default */] {
}

render() {
return this.tmpl`
this.el = this.tmpl`
<section class="item" onclick=${this.handleClick}>
<div ref="title" class="title">${this.title}</div>
<div ref="summary" class="summary">${this.summary}</div>
</section>
`;
return this.el;
}

handleClick() {
Expand Down
3 changes: 2 additions & 1 deletion item.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@ class ItemView extends View {
}

render() {
return this.tmpl`
this.el = this.tmpl`
<section class="item" onclick=${this.handleClick}>
<div ref="title" class="title">${this.title}</div>
<div ref="summary" class="summary">${this.summary}</div>
</section>
`;
return this.el;
}

handleClick() {
Expand Down
3 changes: 2 additions & 1 deletion list.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ class ListView extends View {
}

render() {
return this.tmpl`
this.el = this.tmpl`
<div class="listing">
LISTING:
${this.items.map(item => new ItemView(item).render())}
</div>
`;
return this.el;
}

}
Expand Down