From f7b945c083be2b31dfe8a2986a49afd8aef65e93 Mon Sep 17 00:00:00 2001
From: DarkWiiPlayer
Date: Tue, 12 Apr 2022 22:41:10 +0200
Subject: [PATCH] Document the empty constant
---
page/skooma.html | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/page/skooma.html b/page/skooma.html
index 3df683b..1feb123 100644
--- a/page/skooma.html
+++ b/page/skooma.html
@@ -313,3 +313,17 @@
creates that will always point to the newest version of the element.
+
+
+ The empty
constant
+
+
+ This symbol will be completely ignored when it appears as a children in any skooma generator.
+
+
+ const name = undefined
+ html.div("name: ", name ?? "") // This will generate an (unnecessary) empty text note
+ html.div("name: ", name ?? null) // This will print a warning to the console (same with undefined)
+ html.div("name: ", name ?? empty) // This will only generate the first text node
+
+