Create popup component and implement bestr api calls
This commit is contained in:
16
popup.js
Normal file
16
popup.js
Normal 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)
|
Reference in New Issue
Block a user