close Commandclose [fullscreen] [<expression>]
The close command closes an element. It automatically detects the element type and calls the right API:
<dialog> — calls close()<details> — removes the open attributepopover attribute — calls hidePopover()fullscreen — calls document.exitFullscreen().close() as a fallbackIf no target is given, defaults to me.
<dialog id="my-dialog">
<p>Hello!</p>
<button _="on click close #my-dialog">Close</button>
</dialog>
<button _="on click close fullscreen">Exit Fullscreen</button>