0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-23 15:09:10 -05:00
penpot/frontend/uxbox/ui/dom.cljs
2016-01-03 18:44:13 +02:00

22 lines
356 B
Clojure

(ns uxbox.ui.dom
(:require [goog.dom :as dom]))
(defn get-element-by-class
[^string classname]
(dom/getElementByClass classname))
(defn stop-propagation
[e]
(.stopPropagation e))
(defn prevent-default
[e]
(.preventDefault e))
(defn event->inner-text
[e]
(.-innerText (.-target e)))
(defn event->value
[e]
(.-value (.-target e)))