feat: use setAttribute

This commit is contained in:
Ayo 2023-10-08 04:26:43 +02:00
parent 1f8db22472
commit 2b54ed0eff

View file

@ -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");
}