From 6dc2b7a684293a8da85ed6a93df0550bd0b69180 Mon Sep 17 00:00:00 2001 From: Chris McCormick Date: Fri, 15 Nov 2024 10:58:55 +0000 Subject: [PATCH] Fix #89: Allow evaluate_script_tags to specify scripts. --- src/scittle/core.cljs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/scittle/core.cljs b/src/scittle/core.cljs index bd7b0e2..25732db 100644 --- a/src/scittle/core.cljs +++ b/src/scittle/core.cljs @@ -103,8 +103,10 @@ (eval-script-tags* (rest script-tags))) (eval-script-tags* (rest script-tags)))))) -(defn ^:export eval-script-tags [] - (let [script-tags (.querySelectorAll doc "script[type='application/x-scittle']")] +(defn ^:export eval-script-tags [& script-tags] + (let [script-tags (or script-tags + (.querySelectorAll + doc "script[type='application/x-scittle']"))] (eval-script-tags* script-tags))) (def auto-load-disabled? (volatile! false))