MCPcopy Create free account
hub / github.com/rough-stuff/wired-elements / _attachEvents

Method _attachEvents

packages/wired-toggle/wired-toggle.js:126–136  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

124 }
125
126 _attachEvents() {
127 if (!this._keyboardAttached) {
128 this.addEventListener('keydown', (event) => {
129 if ((event.keyCode === 13) || (event.keyCode === 32)) {
130 event.preventDefault();
131 this._toggleCheck();
132 }
133 });
134 this._keyboardAttached = true;
135 }
136 }
137}
138customElements.define('wired-toggle', WiredToggle);

Callers 1

_didRenderMethod · 0.95

Calls 1

_toggleCheckMethod · 0.95

Tested by

no test coverage detected