Created
March 28, 2019 15:13
-
-
Save abhishekjakhar/4a5a94be35a5755e077da67177e6d541 to your computer and use it in GitHub Desktop.
Event Listener For Dialog Window As Modal
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'); | |
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