update build
This commit is contained in:
parent
28d83f0eed
commit
f05519d63d
1 changed files with 42 additions and 0 deletions
42
base.html
Normal file
42
base.html
Normal file
|
|
@ -0,0 +1,42 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<link rel="stylesheet" href="css/style.css">
|
||||||
|
<script src="js/sci-script-tag.js" type="application/javascript"></script>
|
||||||
|
<script type="application/x-sci">
|
||||||
|
(defn my-alert []
|
||||||
|
(js/alert "You clicked!"))
|
||||||
|
|
||||||
|
(set! (.-my_alert js/window) my-alert)
|
||||||
|
</script>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>SCI script tag</h1>
|
||||||
|
|
||||||
|
<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 my-alert []
|
||||||
|
(js/alert "You clicked!"))
|
||||||
|
|
||||||
|
;; export function to use from JavaScript:
|
||||||
|
(set! (.-my_alert js/window) my-alert)
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<button onclick="my_alert()">
|
||||||
|
Click me!
|
||||||
|
</button>
|
||||||
|
</body></code></pre>
|
||||||
|
|
||||||
|
<button onclick="my_alert()">
|
||||||
|
Click me!
|
||||||
|
</button>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
Loading…
Add table
Add a link
Reference in a new issue