From f14794755807868775266601188b8dce00960177 Mon Sep 17 00:00:00 2001 From: bom Date: Fri, 6 Oct 2023 11:57:15 +0200 Subject: [PATCH] Fix get-content-from-element --- src/main/cljs/dda/c4k_common/browser.cljs | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/src/main/cljs/dda/c4k_common/browser.cljs b/src/main/cljs/dda/c4k_common/browser.cljs index 22d85e9..7d164e4 100644 --- a/src/main/cljs/dda/c4k_common/browser.cljs +++ b/src/main/cljs/dda/c4k_common/browser.cljs @@ -22,21 +22,6 @@ (s/def ::optional boolean?) (def dom-function-parameter (s/keys :opt-un [::deserializer ::optional])) (defn-spec get-content-from-element js-object? - [name string? - & {:keys [deserializer optional] - :or {deserializer nil optional false}} dom-function-parameter] - (let [content (-> (get-element-by-id name) - (.-value))] - (cond - (and optional (some? deserializer)) - (when-not (st/blank? content) - (apply deserializer [content])) - (and (false? optional) (some? deserializer)) - (apply deserializer [content]) - :else - content))) - -(defn-spec get-content-from-element-2 js-object? [name string? & {:keys [deserializer optional] :or {deserializer nil optional false}} dom-function-parameter]