add optional shared link to templates

This commit is contained in:
Alex Turchyn
2025-05-26 13:32:32 +03:00
committed by Pete Matsyburka
parent c91b4a765b
commit e77b5fa2c9
21 changed files with 258 additions and 20 deletions
+14
View File
@@ -0,0 +1,14 @@
export default class extends HTMLElement {
connectedCallback () {
this.addEventListener('click', () => {
if (!this.element.checked) {
this.element.checked = true
this.element.dispatchEvent(new Event('change', { bubbles: true }))
}
})
}
get element () {
return document.getElementById(this.dataset.elementId)
}
}