diff --git a/wc/WComponent.js b/wc/WComponent.js index 095d801..6022c60 100644 --- a/wc/WComponent.js +++ b/wc/WComponent.js @@ -19,6 +19,7 @@ class WComponent extends HTMLElement{ this.attachShadow({ mode: 'open' }); this.setStylesheet(this.stylesheet); this.init(); + this.componentDidInit(); } /** * Call update method in attribute changed callback if attribute name is acceptable @@ -28,6 +29,9 @@ class WComponent extends HTMLElement{ this.update({name, oldValue, newValue}); } } + componentDidInit() { + //this.tabIndex = '0'; // Make component focusable + } update(){} /** * Dynamically create getters & setters for property-attribute sync diff --git a/wc/components/checkable/Checkable.js b/wc/components/checkable/Checkable.js index 00be347..ee983ed 100644 --- a/wc/components/checkable/Checkable.js +++ b/wc/components/checkable/Checkable.js @@ -79,7 +79,6 @@ class Checkable extends WComponent{ } update({ name, oldValue, newValue } = {}) { - console.log(name, oldValue, newValue); // called right after init because first-added attribute will trigger attributeChangedCallback if(name === this.constructor.attributes.checked.name || name === this.constructor.attributes.disabled.name) { const input = this.shadowRoot.querySelector('input');