From 2718fec16b315c9982fdfa6c9a59d7f42278c201 Mon Sep 17 00:00:00 2001 From: Michiel Borkent Date: Sun, 23 May 2021 17:23:04 +0200 Subject: [PATCH] docs --- resources/public/cljs/script.cljs | 4 ++-- resources/public/index.html | 10 +++++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/resources/public/cljs/script.cljs b/resources/public/cljs/script.cljs index fb14901..27b8b45 100644 --- a/resources/public/cljs/script.cljs +++ b/resources/public/cljs/script.cljs @@ -1,2 +1,2 @@ -(defn foo [] - (println :foo)) +(defn my-alert2 [] + (js/alert "My alert 2!")) diff --git a/resources/public/index.html b/resources/public/index.html index a514aa7..6e61060 100644 --- a/resources/public/index.html +++ b/resources/public/index.html @@ -54,7 +54,7 @@ <body> <button onclick="user.myAlert()"> - Click me + Click me! </button> </body> @@ -63,6 +63,14 @@ Click me +

Source from file

+ + When you have a file on your server, say cljs/script.cljs, you can load it using the src attribute: + +
+      <script src="cljs/script.cljs" type="application/x-sci"></script>
+    
+

Reagent plugin

To enable reagent,