How to use the dialog-polyfill/dialog-polyfill.js.registerDialog function in dialog-polyfill

To help you get started, we’ve selected a few dialog-polyfill examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github eldarlabs / cycle-ui / src / dialog / Dialog.ts View on Github external
const insert = (vnode: any) => {
      const dialog: any = document.querySelector('dialog');
      dialogPolyfill.registerDialog(dialog);
      if (props.active) {
        dialog.showModal();
      } else {
        const overlay: any = document.querySelector('._dialog_overlay');
        if (overlay != null) {
          console.log('removing dialog overlay');
          overlay.parentNode.removeChild(overlay);
        }
      }
    };

dialog-polyfill

Polyfill for the dialog element

BSD-3-Clause
Latest version published 3 years ago

Package Health Score

58 / 100
Full package analysis

Similar packages