From e0bee61ec98ab12312b4bf5462d23675de6eafa5 Mon Sep 17 00:00:00 2001 From: Cameron Desautels Date: Wed, 28 Mar 2018 15:20:00 -0500 Subject: [PATCH] Replace (IE-incompatible) use of Element.closest --- src/pushy/core.cljs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pushy/core.cljs b/src/pushy/core.cljs index 10c0d17..6ce8367 100644 --- a/src/pushy/core.cljs +++ b/src/pushy/core.cljs @@ -1,5 +1,6 @@ (ns pushy.core - (:require [goog.events :as events] + (:require [goog.dom :as dom] + [goog.events :as events] [clojure.string]) (:import goog.History goog.history.Html5History @@ -97,7 +98,7 @@ (swap! event-keys conj (on-click (fn [e] - (when-let [el (some-> e .-target (.closest "a"))] + (when-let [el (some-> e .-target (dom/getAncestorByTagNameAndClass "a" nil nil))] (let [uri (.parse Uri (.-href el))] ;; Proceed if `identity-fn` returns a value and ;; the user did not trigger the event via one of the