code-workshop-kit
Version:
The future of remote code workshops & training
19 lines • 723 B
JavaScript
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