mirror of
https://github.com/docusealco/docuseal.git
synced 2026-08-07 07:14:43 +00:00
19 lines
406 B
JavaScript
19 lines
406 B
JavaScript
export default class extends HTMLElement {
|
|
connectedCallback () {
|
|
const dialog = document.getElementById(this.dataset.target)
|
|
|
|
this.querySelector('button').addEventListener('click', () => {
|
|
if (dialog) {
|
|
dialog.inert = false
|
|
dialog.showModal()
|
|
}
|
|
})
|
|
|
|
if (dialog) {
|
|
dialog.addEventListener('close', () => {
|
|
dialog.inert = true
|
|
})
|
|
}
|
|
}
|
|
}
|