Skip to content

Instantly share code, notes, and snippets.

@cataska
Last active September 25, 2018 08:18
Show Gist options
  • Save cataska/8506adbf9d9691ca7d3996d74edbd497 to your computer and use it in GitHub Desktop.
Save cataska/8506adbf9d9691ca7d3996d74edbd497 to your computer and use it in GitHub Desktop.
(ns hello-world.core
(:require [goog.dom :as dom]
[goog.date :refer [getNumberOfDaysInMonth]]
[goog.events :refer [listen]])
(:import [goog.events EventType]
goog.Promise))
(def element (dom/getElement "body"))
(js/console.log (getNumberOfDaysInMonth 2018 9))
(listen js/document EventType.CLICK #(js/console.log "Click!"))
(-> (Promise. (fn [resolve reject] (resolve "Hey")))
(.then #(js/console.log %)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment