Files
serenity/Tests/LibWeb/Layout/input/dialog-open-modal.html
Luke Warlow 85b5be0a20 LibWeb: Implement :modal pseudo class
Adds the :modal pseudo class which matches dialogs opened with
showModal().

(cherry picked from commit 63a5ff70e5f3bee10839415885a158e304719fec)
2024-07-13 21:52:41 -04:00

16 lines
284 B
HTML

<style>
:modal {
display: flex;
}
</style>
<dialog id="modal">
<span>I'm a node</span>
</dialog>
<script>
document.addEventListener("DOMContentLoaded", () => {
let modal = document.getElementById('modal');
modal.showModal();
});
</script>