mirror of
https://github.com/penpot/penpot.git
synced 2025-01-24 07:29:08 -05:00
22 lines
356 B
Clojure
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)))
|