Dont store empty classes or events if they are null upon change.

This commit is contained in:
2020-07-30 10:11:09 -07:00
parent bfca6d48e6
commit 4e53913331
2 changed files with 20 additions and 8 deletions

View File

@ -12,7 +12,8 @@ class Sheet extends IgniteElement {
items: ["1", "2"],
href: "www.google.com",
name: "default content",
linkClick: this.onClick
linkClick: this.onClick1,
linkClick2: this.onClick2
};
}
@ -29,15 +30,17 @@ class Sheet extends IgniteElement {
new html("<h3>---- begin sheet's slot ----<h3>"),
new slot(this),
new html("<h3>---- end of slot ----</h3>"),
new a("I go nowhere, but you can click me ;)").on("click", this.linkClick)
new a("I go nowhere, but you can click me ;)").on("click", this.linkClick).on("click", this.linkClick2)
)
);
}
onClick(event) {
console.log("Element was clicked!");
console.log("Event:");
console.log(event);
onClick1(event) {
console.log("Element was clicked 1!");
}
onClick2(event) {
console.log("Element was clicked 2!");
}
}