From 8d05b2dea4afc46a03dc12e26d7b37d45140eaf9 Mon Sep 17 00:00:00 2001 From: Hayleigh Thompson Date: Sat, 19 Aug 2023 22:40:55 +0100 Subject: :sparkles: Allow starting args to be passed to an app's init function on start. --- lib/src/lustre.ffi.mjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/src/lustre.ffi.mjs') diff --git a/lib/src/lustre.ffi.mjs b/lib/src/lustre.ffi.mjs index b99f6e2..998c598 100644 --- a/lib/src/lustre.ffi.mjs +++ b/lib/src/lustre.ffi.mjs @@ -25,7 +25,7 @@ export class App { this.#view = render; } - start(selector = "body") { + start(selector, flags) { if (this.#root) return this; try { @@ -33,7 +33,7 @@ export class App { selector instanceof HTMLElement ? selector : document.querySelector(selector); - const [next, effects] = this.#init(); + const [next, effects] = this.#init(flags); this.#root = el; this.#state = next; -- cgit v1.2.3