aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/src/lustre.ffi.mjs1
-rw-r--r--lib/src/lustre.gleam5
2 files changed, 6 insertions, 0 deletions
diff --git a/lib/src/lustre.ffi.mjs b/lib/src/lustre.ffi.mjs
index b0f4661..10524e0 100644
--- a/lib/src/lustre.ffi.mjs
+++ b/lib/src/lustre.ffi.mjs
@@ -216,3 +216,4 @@ export const setup_component = (
// UTLS ------------------------------------------------------------------------
export const is_browser = () => window && window.document;
+export const is_registered = (name) => !!customElements.get(name);
diff --git a/lib/src/lustre.gleam b/lib/src/lustre.gleam
index ec04f3e..2585a5b 100644
--- a/lib/src/lustre.gleam
+++ b/lib/src/lustre.gleam
@@ -253,3 +253,8 @@ pub fn start(
pub fn is_browser() -> Bool {
False
}
+
+@external(javascript, "./lustre.ffi.mjs", "is_registered")
+pub fn is_registered(_name: String) -> Bool {
+ False
+}