Skip to content

Instantly share code, notes, and snippets.

@swannodette
Created May 24, 2012 19:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save swannodette/2783861 to your computer and use it in GitHub Desktop.
Save swannodette/2783861 to your computer and use it in GitHub Desktop.
ex.cljs
(defn sample-component [opt-label opt-dom-helper]
(this-as self
(goog.ui.Component self opt-dom-helper)
(set! (.-initialLabel_ self) (or opt-label "Click Me"))
(set! (.-color_ self) "red")
(set! (.-eh_ self) (goog.events.EventHandler. self))
(set! (.-kh_ self) nil))
(goog.inherits sample-component goog.ui.Component)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment