From cdc597889788628c3af7e510a385b55d4dce0bcf Mon Sep 17 00:00:00 2001 From: DarkWiiPlayer Date: Tue, 12 Apr 2022 22:44:53 +0200 Subject: [PATCH] Document the handle helper --- page/skooma.html | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/page/skooma.html b/page/skooma.html index 1feb123..816d466 100644 --- a/page/skooma.html +++ b/page/skooma.html @@ -314,6 +314,21 @@

+
+

The handle helper

+ +

+ This helper function takes an event handler and wraps it in a new + function that calls preventDefault on the event before + passing it to the original function. +

+ + html.form(html.button({ + click: handle(event => console.log("I'm not submitting anything")) + })) + +
+

The empty constant