diff options
-rw-r--r-- | lib/src/lustre.gleam | 10 | ||||
-rw-r--r-- | lib/src/lustre/element/hooks.gleam | 0 |
2 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 +} diff --git a/lib/src/lustre/element/hooks.gleam b/lib/src/lustre/element/hooks.gleam new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/lib/src/lustre/element/hooks.gleam |