attributeChangedCallback(name, oldVal, newVal) {
        if (oldVal !== newVal) {
            switch(name) {
                case 'content':
                    this.content = newVal
                    if (this.content.indexOf(this.selectedValue) === -1) {
                        this.selectedValue = this.content[0]
                    }
                    this.render()
                    break;
                case 'default-value':
                    this.defaultValue = newVal
                    break;
                case 'selected-value':
                    this.selectedValue = newVal
                    this.render()
                    break;
            }
        }
    }
// To do when a attribute changed
To do when a attribute changed
To do when a attribute changed
attributeChangedCallback(name, oldVal, newVal) {
        if (oldVal !== newVal) {
            switch(name) {
                case 'content':
                    this.content = newVal
                    if (this.content.indexOf(this.selectedValue) === -1) {
                        this.selectedValue = this.content[0]
                    }
                    this.render()
                    break;
                case 'default-value':
                    this.defaultValue = newVal
                    break;
                case 'selected-value':
                    this.selectedValue = newVal
                    this.render()
                    break;
            }
        }
    }
attributeChangedCallback ( name , oldVal , newVal ) { if ( oldVal !== newVal ) { switch ( name ) { case 'content' : this . content = newVal if ( this . content . indexOf ( this . selectedValue ) === - 1 ) { this . selectedValue = this . content [ 0 ] } this . render ( ) break ; case 'default-value' : this . defaultValue = newVal break ; case 'selected-value' : this . selectedValue = newVal this . render ( ) break ; } } }
To do when a attribute changed
To do when a attribute changed