Invokers

A customizable modal dialog without a JS click handler

<!--
Contents of dialog wrapper DIV Element
If GreenLight Element is extended to allow <dialog> tag, wrapper can be styled via the builder GUI. Until then, just use custom classes
-->
<dialog id="dialog" class="gs-dialog-custom">
  <p>A customizable modal dialog without a JS click handler</p>
  <button commandfor="dialog" command="close">Close</button>
</dialog>
HTML
Originally seen on 
https://markodenic.tech/stop-writing-click-handlers-for-ui/
  Minimally adapted to run using GreenLight element blocks

This website uses cookies to enhance your browsing experience and ensure the site functions properly. By continuing to use this site, you acknowledge and accept our use of cookies.

Accept All Accept Required Only