diff options
author | Hayleigh Thompson <me@hayleigh.dev> | 2023-08-19 22:40:55 +0100 |
---|---|---|
committer | Hayleigh Thompson <me@hayleigh.dev> | 2023-08-19 22:40:55 +0100 |
commit | 8d05b2dea4afc46a03dc12e26d7b37d45140eaf9 (patch) | |
tree | 37ab92610f2fb8290c208ebb4137ad194afbb7d2 /lib/src/lustre.ffi.mjs | |
parent | 9919bc2702c89168d1805eaa0db9e4baff091260 (diff) | |
download | lustre-8d05b2dea4afc46a03dc12e26d7b37d45140eaf9.tar.gz lustre-8d05b2dea4afc46a03dc12e26d7b37d45140eaf9.zip |
:sparkles: Allow starting args to be passed to an app's init function on start.
Diffstat (limited to 'lib/src/lustre.ffi.mjs')
-rw-r--r-- | lib/src/lustre.ffi.mjs | 4 |
1 files changed, 2 insertions, 2 deletions
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; |