feat: use setAttribute
This commit is contained in:
parent
1f8db22472
commit
2b54ed0eff
1 changed files with 1 additions and 2 deletions
|
@ -9,8 +9,7 @@ export default class HelloWorld extends WebComponent {
|
||||||
let count = 0;
|
let count = 0;
|
||||||
this.onclick = () => {
|
this.onclick = () => {
|
||||||
console.log("Clicked!");
|
console.log("Clicked!");
|
||||||
this.name = `I was clicked ${++count} times`;
|
this.setAttribute("name", `I was clicked ${++count} times`);
|
||||||
this.render();
|
|
||||||
};
|
};
|
||||||
this.setAttribute("title", "Click me please");
|
this.setAttribute("title", "Click me please");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue