Created
December 16, 2011 18:00
-
-
Save anonymous/1487157 to your computer and use it in GitHub Desktop.
clojuresrcipt question
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
(ns simplebutton.core | |
(:require [goog.dom :as dom])) | |
;; -------------------------= Debug =----------------------- | |
(defn debug | |
"Output goes to your web browser's console" | |
[msg] | |
(js/console.log msg)) | |
;(defn debug [_]) ;; switch to this debug to turn off output | |
(defn ^:export copytext [] | |
(debug "in the copytext code") | |
(debug (.value (dom/getElement "field1"))) | |
(let [e (dom/getElement "field2")] | |
(doto e (dom/setTextContent (.value (dom/getElement "field1"))))) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment