chore: update onChanges example

This commit is contained in:
Ayo 2023-09-17 13:40:48 +02:00
parent ce9210d93c
commit ccd3d9ed18

View file

@ -152,8 +152,9 @@ import WebComponent from "https://unpkg.com/web-component-base";
class ClickableText extends WebComponent { class ClickableText extends WebComponent {
// gets called when an attribute value changes // gets called when an attribute value changes
onChanges({attr, prev, curr}) { onChanges(changes) {
console.log('>>> something changed', {attr, prev, curr}) const {property, previousValue, currentValue} = changes;
console.log('>>> ', {property, previousValue, currentValue})
} }
get template() { get template() {