aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHayleigh Thompson <me@hayleigh.dev>2023-07-19 10:49:28 +0100
committerHayleigh Thompson <me@hayleigh.dev>2023-07-19 10:49:28 +0100
commit52d3b605d23ad463da850a7294593ebfb4800cb3 (patch)
treecee534407bef1a7edace5074b8a261588fec82f2
parentc8867aab178a8532d5269cb7189220e597df8a13 (diff)
downloadlustre-52d3b605d23ad463da850a7294593ebfb4800cb3.tar.gz
lustre-52d3b605d23ad463da850a7294593ebfb4800cb3.zip
:memo: Attribute html element reference to MDN.
-rw-r--r--src/lustre/html.gleam8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lustre/html.gleam b/src/lustre/html.gleam
index 0f64b08..d5b7b4c 100644
--- a/src/lustre/html.gleam
+++ b/src/lustre/html.gleam
@@ -3,6 +3,12 @@
import lustre/element.{Element, h, t}
import lustre/attribute.{Attribute}
+// The doc comments (and order) for functions in this module are taken from the
+// MDN Element reference:
+//
+// https://developer.mozilla.org/en-US/docs/Web/HTML/Element
+//
+
// HTML ELEMENTS: MAIN ROOT ----------------------------------------------------
/// Represents the root (top-level element) of an HTML document, so it is also
@@ -879,7 +885,7 @@ pub fn noscript(
/// languages, such as WebGL's GLSL shader programming language and JSON.
///
pub fn script(attrs: List(Attribute(msg)), js: String) -> Element(msg) {
- h("script", attrs, [element.unescaped_text(js)])
+ h("script", attrs, [t(js)])
}
// HTML ELEMENTS: DEMARCATING EDITS ---------------------------------------------