update build
This commit is contained in:
parent
ed5776a7b1
commit
bef16ec199
3 changed files with 2488 additions and 1751 deletions
13
index.html
13
index.html
|
|
@ -5,9 +5,11 @@
|
|||
<script src="js/sci-script-tag-plugin-reagent.js" type="application/javascript"></script>
|
||||
|
||||
<script type="application/x-sci">
|
||||
(defn ^:export my-alert []
|
||||
(defn my-alert []
|
||||
(js/alert "You clicked!"))
|
||||
|
||||
(set! (.-my_alert js/window) my-alert)
|
||||
|
||||
(require '[reagent.core :as r]
|
||||
'[reagent.dom :as rdom])
|
||||
|
||||
|
|
@ -47,17 +49,18 @@
|
|||
|
||||
Include <tt>sci-script-tag.js</tt> and write a <tt>script</tt> tag
|
||||
where <tt>type</tt> is set
|
||||
to <tt>application/x-sci</tt>. Use <tt>:export</tt> to make the function
|
||||
available in the JavaScript environment. The name is processed
|
||||
using <tt>munge</tt>.
|
||||
to <tt>application/x-sci</tt>.
|
||||
|
||||
<pre>
|
||||
<code class="html"><head>
|
||||
<script src="https://borkdude.github.io/sci-script-tag/js/sci-script-tag.js" type="application/javascript"></script>
|
||||
|
||||
<script type="application/x-sci">
|
||||
(defn ^:export my-alert []
|
||||
(defn my-alert []
|
||||
(js/alert "You clicked!"))
|
||||
|
||||
;; export function to use from JavaScript:
|
||||
(set! (.-my_alert js/window) my-alert)
|
||||
</script>
|
||||
|
||||
</head>
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
3882
js/sci-script-tag.js
3882
js/sci-script-tag.js
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue