| <script src="../dist/dialog-polyfill.js"></script> |
| <link rel="stylesheet" type="text/css" href="../dist/dialog-polyfill.css"> |
| Enter a value and submit the form. The close event will be fired and the <code>returnValue</code> of the dialog will be alerted. |
| <input type="text" placeholder="Focusable pre" /> |
| <input type="text" placeholder="Enter value" /> |
| <input type="reset" value="Reset" /> |
| <input type="submit" value="Stuff" /> |
| <input type="submit" value="Done" /> |
| <button type="submit" value="Button Value Is Different Than Text">Button Submit</button> |
| <button value="Regular Button Value">Button</button> |
| <button id="show">Show Dialog</button> |
| <input type="text" placeholder="Focusable post" /> |
| var dialog = document.querySelector('dialog'); |
| dialogPolyfill.registerDialog(dialog); |
| dialog.addEventListener('close', function() { |
| var valueEl = dialog.querySelector('input[type="text"]'); |
| alert(dialog.returnValue); |
| show.addEventListener('click', function() { |