diff --git a/examples/browser-auth.el b/examples/browser-auth.el index 214b73d..a9a5427 100644 --- a/examples/browser-auth.el +++ b/examples/browser-auth.el @@ -1,11 +1,14 @@ -// browser-auth.el -- El-compiled auth flow using Supabase via native_js_call +// browser-auth.el -- El-compiled auth flow using Supabase // // Compile: elc --target=js --bundle examples/browser-auth.el > auth.js // (requires el_runtime.js in the same directory as browser-auth.el) // // Demonstrates: +// - extern fn for declaring Supabase client constructor +// - anonymous function literals for callbacks +// - method call syntax on Any-typed values (client.auth.signInWithOtp) +// - try/catch for error handling // - @async functions with DOM interaction -// - native_js_call to invoke third-party library methods (Supabase) // - DOM bridge: dom_get_element, dom_get_value, dom_set_text, dom_add_class // dom_remove_class, dom_show, dom_hide, dom_is_null // - window_set to expose El functions to the browser global scope @@ -19,8 +22,16 @@ // #auth-message -- status message container // #auth-form -- the form to hide after success // -// Supabase client is expected on window.supabase (loaded from Supabase CDN -// via a separate script tag before auth.js). +// The Supabase JS SDK is loaded from CDN via a