japji/resources/public/html/export.html
2025-09-01 12:49:14 +01:00

17 lines
443 B
HTML

<html>
<head>
<script src="https://cdn.jsdelivr.net/npm/scittle@0.7.27/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>