Create popup component and implement bestr api calls

This commit is contained in:
2024-01-30 10:09:16 +01:00
parent db9785744f
commit 1ce46bf8a2
5 changed files with 102 additions and 31 deletions

16
popup.js Normal file
View File

@@ -0,0 +1,16 @@
class MyComponent extends HTMLElement {
static get observedAttributes() {
return ['my-attribute']
}
attributeChangedCallback(name, oldValue, newValue) {
if (name === 'my-attribute') {
console.log(
`Value of my-attribute changed from ${oldValue} to ${newValue}`
)
// You can perform some action based on the new value here
}
}
}
customElements.define('my-component', MyComponent)