HTML has been gobbling up swathes of what used to be JavaScript’s remit. This page lists a bunch of dynamic functionality that we can now achieve with just HTML. <dialog> Available since March 2022 Chrome 37+ Edge 79+ Firefox 98+ Opera 24+ Safari 15.4+ Chrome Android 37+ Firefox for Android 98+ Opera Android 24+ Safari on iOS 15.4+ Samsung Internet 3+ WebView Android 37+ Opened and closed entirely with command and commandfor HTML attributes that describe what command is being directed at which element, matched by id. Open dialog Look, Ma! No JavaScript! Close <button command=”show-modal” commandfor=”example-dialog”>Open dialog</button> <dialog id=”example-dialog”> <p>Look, Ma! No JavaScript!</p> <form method=”dialog”>…
HTML Can Do That
Advertisement