Copybara bot | be50d49 | 2023-11-30 00:16:42 +0100 | [diff] [blame] | 1 | <!DOCTYPE html> |
| 2 | <html> |
| 3 | <meta charset='utf-8'> |
| 4 | <head> |
| 5 | <script src="../dist/dialog-polyfill.js"></script> |
| 6 | <link rel="stylesheet" type="text/css" href="../dist/dialog-polyfill.css"> |
| 7 | <style> |
| 8 | dialog { |
| 9 | height: 100px; |
| 10 | width: 100px; |
| 11 | } |
| 12 | |
| 13 | dialog + .backdrop { |
| 14 | background-color: rgba(0,255,0,0.5); |
| 15 | } |
| 16 | </style> |
| 17 | </head> |
| 18 | <body> |
| 19 | <p>Test for backdrop. The test passes if you see a green background behind the |
| 20 | box.</p> |
| 21 | <div id="console"></div> |
| 22 | <dialog></dialog> |
| 23 | <button id="inert-button">Can't click me</button> |
| 24 | <script> |
| 25 | function writeToConsole(s) { |
| 26 | var console = document.getElementById('console'); |
| 27 | var span = document.createElement('span'); |
| 28 | span.textContent = s; |
| 29 | console.appendChild(span); |
| 30 | console.appendChild(document.createElement('br')); |
| 31 | } |
| 32 | |
| 33 | var dialog = document.querySelector('dialog'); |
| 34 | dialogPolyfill.registerDialog(dialog); |
| 35 | dialog.showModal(); |
| 36 | </script> |
| 37 | </body> |
| 38 | </html> |