Fix #89: Allow evaluate_script_tags to specify scripts. (#90)

* Fix #89: Allow evaluate_script_tags to specify scripts.

* Updatte changelog.
This commit is contained in:
Chris McCormick 2024-11-15 11:06:58 +00:00 committed by GitHub
parent dbbb3ef2d2
commit 06621b2dab
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 2 deletions

View file

@ -9,6 +9,8 @@
<!-- - Create Github release with updated links from `doc/links.md` -->
<!-- - `bb gh-pages` -->
- [#89](https://github.com/babashka/babashka/issues/89): allow `evaluate_script_tags` to specify individual scripts.
## v0.6.19 (2024-10-08)
- Add `cljs.pprint/code-dispatch` and `cljs.pprint/with-pprint-dispatch`

View file

@ -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))