Skip to content

Instantly share code, notes, and snippets.

@cataska
Last active September 24, 2018 22:49
Show Gist options
  • Save cataska/0cd88e83d0b5155820d8a0dfa6ae4f54 to your computer and use it in GitHub Desktop.
Save cataska/0cd88e83d0b5155820d8a0dfa6ae4f54 to your computer and use it in GitHub Desktop.
;; Invoking methods
(js/alert "ClojureScript")
(.log js/console "Hello")
;; Accessing properties
(.-innerHtml el)
(aget el "innerHtml")
;; Modifying properties
(set! (.-innerHtml el) "ClojureScript")
(aset el "innerHtml" "ClojureScript")
;; Creating native object
(js-obj "a" 1 "b" true "c" nil)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment