Skip to content

Instantly share code, notes, and snippets.

@abhishekjakhar
Created April 2, 2019 12:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abhishekjakhar/13c29a4d8578fbfdae2911fff9db403e to your computer and use it in GitHub Desktop.
Save abhishekjakhar/13c29a4d8578fbfdae2911fff9db403e to your computer and use it in GitHub Desktop.
Dialog Polyfill JS
<!doctype html>
<html>
<head>
<title>HTML Dialog Element</title>
<link rel="stylesheet" href="dialog-polyfill.css">
<link rel="stylesheet" href="main.css">
</head>
<body>
<dialog id="dialogWindow">
<form method="dialog">
<input type="text">
<button type="submit">OK</button>
</form>
</dialog>
<button id="openDialog" class="button">Open Dialog</button>
<button id="openModalDialog" class="button">Open Modal Dialog</button>
</body>
<script src="dialog-polyfill.js"></script>
<script src="app.js"></script>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment