(ns-ready)
(ns-ready opts)
(ns-ready* ns-name opts)
use (ns-ready) macro, do not use this directly
use (ns-ready) macro, do not use this directly
(restart)
(run-embedded-tags node)
use after calling (dom/set-html node html) and that html may contain embedded script tags
only runs tags when the namespace of the function is already loaded, if the ns is not yet loaded to ns-ready function will pick remaining tags
use after calling (dom/set-html node html) and that html may contain embedded script tags only runs tags when the namespace of the function is already loaded, if the ns is not yet loaded to ns-ready function will pick remaining tags
(run-script-tag script)
a <script type="shadow/run" data-fn="js-fn">edn-args</script> tag is meant to embed calls to javascript in html instead of writing the javascript inline, we only define the call and its args + the location in the dom we want to reference. this allows the javascript to be loaded as late as possible, avoids unknown reference errors, does not litter the html with $(function() {}); and since a dom reference point is provided it makes it more logical to reference dom elements via the server, no need to mess with id/class selectors.
script tags will be executed as soon as the js module is loaded (assuming it called module-ready), not on dom ready which means it triggers earlier
a <script type="shadow/run" data-fn="js-fn">edn-args</script> tag is meant to embed calls to javascript in html instead of writing the javascript inline, we only define the call and its args + the location in the dom we want to reference. this allows the javascript to be loaded as late as possible, avoids unknown reference errors, does not litter the html with $(function() {}); and since a dom reference point is provided it makes it more logical to reference dom elements via the server, no need to mess with id/class selectors. script tags will be executed as soon as the js module is loaded (assuming it called module-ready), not on dom ready which means it triggers earlier
(run-tags-for-ns ns-name)
(script->dom-el script)
(script-tags-for-ns ns-name)
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close