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;
|
||||
this.onclick = () => {
|
||||
console.log("Clicked!");
|
||||
this.name = `I was clicked ${++count} times`;
|
||||
this.render();
|
||||
this.setAttribute("name", `I was clicked ${++count} times`);
|
||||
};
|
||||
this.setAttribute("title", "Click me please");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue