From 494241a15ab6947f9d668abd6ea16d69f79e406b Mon Sep 17 00:00:00 2001 From: bom Date: Fri, 22 Oct 2021 15:33:32 +0200 Subject: [PATCH] dont append to body directly but c4k-content div instead --- src/main/cljs/dda/c4k_common/browser.cljs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/main/cljs/dda/c4k_common/browser.cljs b/src/main/cljs/dda/c4k_common/browser.cljs index c1f9841..8d66480 100644 --- a/src/main/cljs/dda/c4k_common/browser.cljs +++ b/src/main/cljs/dda/c4k_common/browser.cljs @@ -73,10 +73,9 @@ .createRange (.createContextualFragment html-string))) -(defn append-to-body +(defn append-to-c4k-content [js-obj] - (-> js/document - .-body + (-> (get-element-by-id "c4k-content") (.appendChild js-obj))) (defn append-hickory @@ -84,7 +83,7 @@ (-> hickory-obj (hr/hickory-to-html) (create-js-obj-from-html) - (append-to-body))) + (append-to-c4k-content))) (defn generate-feedback-tag [id]