UNPKG

code-workshop-kit

Version:
19 lines 723 B
import { LionDialog } from '@lion/dialog'; export class CwkDialog extends LionDialog { __onConfirm(e) { const _e = e; this.dispatchEvent(new CustomEvent('cwk-confirm-pw', { detail: _e.detail, bubbles: true, composed: true })); } connectedCallback() { super.connectedCallback(); this.__boundConfirm = this.__onConfirm.bind(this); this._overlayContentNode.addEventListener('cwk-confirm-pw', this.__boundConfirm); } disconnectedCallback() { super.disconnectedCallback(); if (this.__boundConfirm) { this._overlayContentNode.removeEventListener('cwk-confirm-pw', this.__boundConfirm); } } } //# sourceMappingURL=CwkDialog.js.map