blob: 77c6d81f9d86f48f551ecc09647dcce63309b7ec [file] [log] [blame]
Copybara botbe50d492023-11-30 00:16:42 +01001<!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>
8dialog {
9 height: 100px;
10 width: 100px;
11}
12
13dialog + .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
20box.</p>
21<div id="console"></div>
22<dialog></dialog>
23<button id="inert-button">Can't click me</button>
24<script>
25function 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
33var dialog = document.querySelector('dialog');
34dialogPolyfill.registerDialog(dialog);
35dialog.showModal();
36</script>
37</body>
38</html>