| <!DOCTYPE html> |
| <html> |
| <title>Test that adding display: none; dynamically on ::backdrop makes it disappear</title> |
| <meta charset="utf-8"> |
| <link rel="author" title="Tim Nguyen" href="https://github.com/nt1m"> |
| <link rel="match" href="backdrop-dynamic-display-none-ref.html"> |
| <link rel="help" href="https://fullscreen.spec.whatwg.org/#new-stacking-layer"> |
| <p>Test passes if there is no red.</p> |
| <dialog></dialog> |
| <style> |
| dialog { visibility: hidden; } |
| ::backdrop { background-color: red; } |
| .hidden-backdrop::backdrop { |
| display: none; |
| } |
| </style> |
| <script> |
| dialog = document.querySelector("dialog"); |
| dialog.showModal(); |
| requestAnimationFrame(() => { |
| dialog.classList.add("hidden-backdrop"); |
| }); |
| </script> |
| </html> |