The native <dialog> element is neat. It has the correct semantics, it appears in the top layer, it keeps track of focus, and it gives you mostly intuitive ways to open/close it. So if you want a modal dialog, you can just drop a wee dialog.showModal(...

Markdown supported · ⌘↵ to post
Martin K.
Software Architect
Thank you for sharing! ❤️ Should save a lot of developers a lot of time!