Web Dev Solutions

Catalin Mititiuc

From ea2ff860fa53620491385685330e99c71ffc7581 Mon Sep 17 00:00:00 2001 From: Catalin Mititiuc Date: Thu, 18 Apr 2024 19:13:37 -0700 Subject: Use checkboxes for grenades --- public/soldier_record_block.js | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'public/soldier_record_block.js') diff --git a/public/soldier_record_block.js b/public/soldier_record_block.js index fd1c661..0bf5a9a 100644 --- a/public/soldier_record_block.js +++ b/public/soldier_record_block.js @@ -47,6 +47,11 @@ customElements.define( shadowRoot.appendChild(templateContent.cloneNode(true)); } + + connectedCallback() { + // this.shadowRoot.querySelectorAll('.grenades *').forEach(el => el.addEventListener('click', e => e.stopPropagation())); + this.shadowRoot.querySelector('.grenades').addEventListener('click', e => e.stopPropagation()); + } }, { extends: 'div' } ); -- cgit v1.2.3