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

23 lines
356 B
Text
Raw Normal View History

(ns uxbox.ui.dom
(:require [goog.dom :as dom]))
(defn get-element-by-class
[^string classname]
(dom/getElementByClass classname))
2015-12-14 09:50:19 +02:00
(defn stop-propagation
[e]
(.stopPropagation e))
(defn prevent-default
[e]
(.preventDefault e))
2015-12-15 22:42:02 +02:00
(defn event->inner-text
[e]
(.-innerText (.-target e)))
2015-12-15 22:42:02 +02:00
(defn event->value
[e]
(.-value (.-target e)))