Added ref functionality to get a ref from any template once it's created. Next up is property callback cleanup and disconnection upon element being removed.

This commit is contained in:
2020-07-28 09:50:26 -07:00
parent b591a42370
commit 1adb844c97
3 changed files with 22 additions and 3 deletions

View File

@ -26,7 +26,7 @@ class Sheet extends IgniteElement {
new div(
new html("<h2>this is before</h2>"),
new list(this.items, (item) => {
return new html(`<h1>${item}</h1>`)
return new a(`${item}`).attribute("href", this.href)
}),
new html("<h2>this is after</h2>"),
new a("this is a link").attribute("href", this.href)