web components get attribute code example
Example 1: create custom html element
class className extends HTMLElement{
contructor(){
super()
this._root = this.attachShadow({mode:"open"})
connectedCallback(){
}
disconnectedCallback(){
}
adoptedCallback(){
}
attributeChangedCallback(nameOfAtr, oldValue, newValue){
}
}
}
window.customElements.define("what you want your tag name to be",class name of tag)
Example 2: Which function is used to add functionality to a custom component?
AFRAME.registerComponent(..);