Created
November 6, 2025 12:40
-
-
Save sogaiu/411840213bf511448a89bd5a58bd44d3 to your computer and use it in GitHub Desktop.
scittle basic (from https://babashka.org/scittle/)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <html> | |
| <head> | |
| <script src="https://cdn.jsdelivr.net/npm/[email protected]/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> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment