79422816

Date: 2025-02-08 08:08:40
Score: 0.5
Natty:
Report link

i used this little trick and i think it's better than writing the logic separately in js

<dialog>
  <form method="dialog">
    <!-- stuff you want -->
    <button type="button" class="btn" onclick="this.closest('dialog').close()">
      Cancel
    </button>
  </form>
</dialog>
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Usman Sabuwala