Skip to content

Commit

Permalink
App is getting embedded in div with id 'content' instead of body. Thi…
Browse files Browse the repository at this point in the history
…s allows interactive programming using cljs REPL
  • Loading branch information
dturczanski committed Apr 3, 2013
1 parent e8ba6e9 commit ce36b0b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/webfui/core.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@
[cljs.reader :only [read-string]]))

;; This file contains the core engine for webfui. You usually don't want to load this file directly, instead load webfui.dom or webfui.framework.

(defn body []
(.-body js/document))
(.getElementById js/document "content"))

(defn select-path-dom [node path]
(if-let [[cur & more] (seq path)]
Expand Down
2 changes: 1 addition & 1 deletion src/webfui/dom_manipulation.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
;; This file is for DOM manipulation functions used by both the core of webfui as well as plugins.

(defn path-dom [node]
(drop 3
(drop 4
(reverse ((fn f [node]
(lazy-seq (when node
(cons (dec (count (take-while identity (iterate #(.-previousSibling %) node)))) (f (.-parentNode node))))))
Expand Down
2 changes: 1 addition & 1 deletion src/webfui/utilities.cljs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(ns webfui.utilities)

(defn body []
(.-body js/document))
(.getElementById js/document "content"))

(defn get-attribute [element key]
(get-in element [1 key]))
Expand Down

0 comments on commit ce36b0b

Please sign in to comment.