Created
April 2, 2019 12:20
-
-
Save abhishekjakhar/6d365c3c82d67700fdbe4ebae4f17ee5 to your computer and use it in GitHub Desktop.
Register Dialog Polyfill
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
let openDialog = document.getElementById('openDialog'); | |
let openModalDialog = document.getElementById('openModalDialog'); | |
let dialogWindow = document.getElementById('dialogWindow'); | |
dialogPolyfill.registerDialog(dialogWindow); | |
openDialog.addEventListener('click', () => { | |
dialogWindow.show(); | |
}) | |
openModalDialog.addEventListener('click', () => { | |
dialogWindow.showModal(); | |
}) | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment