aboutsummaryrefslogtreecommitdiff
path: root/lib/src/lustre.gleam
diff options
context:
space:
mode:
Diffstat (limited to 'lib/src/lustre.gleam')
-rw-r--r--lib/src/lustre.gleam10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/src/lustre.gleam b/lib/src/lustre.gleam
index 4c9ff22..dcfe76a 100644
--- a/lib/src/lustre.gleam
+++ b/lib/src/lustre.gleam
@@ -50,8 +50,9 @@ import lustre/element.{Element}
pub type App(flags, model, msg)
pub type Error {
- ElementNotFound
ComponentAlreadyRegistered
+ ElementNotFound
+ NotABrowser
}
// CONSTRUCTORS ----------------------------------------------------------------
@@ -243,3 +244,10 @@ pub fn start(
selector: String,
flags: flags,
) -> Result(fn(msg) -> Nil, Error)
+
+// UTILS -----------------------------------------------------------------------
+
+@external(javascript, "./lustre.ffi.mjs", "is_browser")
+pub fn is_browser() -> Bool {
+ False
+}