Upgrade shadow
This commit is contained in:
parent
ca2bc107f0
commit
8906a59ab1
7 changed files with 189 additions and 7 deletions
42
resources/public/base.html
Normal file
42
resources/public/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