scittle/resources/public/html/export.html
Michiel Borkent 2f9d68d118 v0.1.2
2022-02-25 10:53:56 +01:00

17 lines
442 B
HTML

<html>
<head>
<script src="https://cdn.jsdelivr.net/npm/scittle@0.1.2/dist/scittle.js" type="application/javascript"></script>
<script type="application/x-scittle">
(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>
</html>