Comments (4)
Hello, Murtaza, can you please show us the code where you actually use reg-form
?
from enfocus.
Murtaza,
The content transform should support anything that looks like a node
(including dom fragments), anything that looks like a sequence of nodes and
finally strings. If it is having trouble with a DocumentFragment (I am
assuming that is what is returning from reg-form) that would be a bug. Is
it possible for you to find a small representative case that maybe I can
build locally. What is the library providing defhtml called? What is
output by the log statement?
CK
On Fri, Jun 22, 2012 at 7:25 AM, Murtaza Husain <
[email protected]
wrote:
Hi,
I have the below code working. In this I am generating HTML / DOM object
using crate. Then I am inserting that into the DOM using the content macro
of enfocus.However the content macro of enfocus is only suppose to work with enfocus
tags, and here I have a DOM object !(defn layout [c]
"Takes html string as input and inserts it into the DOM"
(log "Layout Content" c)
(at (doc)
[".cljs-main"](content c)))(defhtml reg-form []
[:div.form-horizontal
[:fieldset
[:legend "Student Registeration"]
[:div.control-group
[:label.control-label {:for "input01" :bind "click:
faiz.client.info-collection.hello"} "Text Input"]]]])(defn render [](layout %28reg-form%29))
Thanks,
Murtaza
Reply to this email directly or view it on GitHub:
#15
from enfocus.
Hello Creighton,
You are correct it is actually a DOM fragment. defhtml is provided by crate
(Chris Ganger) and is a cljs version of hiccup.
So that resolves it now. Also is there a way for me to inspect the dom
fragment in the repl itself?
Thanks,
Murtaza
On Fri, Jun 22, 2012 at 6:25 PM, Creighton Kirkendall <
[email protected]
wrote:
Murtaza,
The content transform should support anything that looks like a node
(including dom fragments), anything that looks like a sequence of nodes and
finally strings. If it is having trouble with a DocumentFragment (I am
assuming that is what is returning from reg-form) that would be a bug. Is
it possible for you to find a small representative case that maybe I can
build locally. What is the library providing defhtml called? What is
output by the log statement?CK
On Fri, Jun 22, 2012 at 7:25 AM, Murtaza Husain <
[email protected]wrote:
Hi,
I have the below code working. In this I am generating HTML / DOM object
using crate. Then I am inserting that into the DOM using the content
macro
of enfocus.However the content macro of enfocus is only suppose to work with enfocus
tags, and here I have a DOM object !(defn layout [c]
"Takes html string as input and inserts it into the DOM"
(log "Layout Content" c)
(at (doc)
[".cljs-main"](content c)))(defhtml reg-form []
[:div.form-horizontal
[:fieldset
[:legend "Student Registeration"]
[:div.control-group
[:label.control-label {:for "input01" :bind "click:
faiz.client.info-collection.hello"} "Text Input"]]]])(defn render [](layout %28reg-form%29))
Thanks,
Murtaza
Reply to this email directly or view it on GitHub:
#15
Reply to this email directly or view it on GitHub:
#15 (comment)
from enfocus.
Hello Sergei - I am directly calling the the (render) funciton which then
adds the DOM generated by crate (hiccup) to the DOM using enfocus.
On Fri, Jun 22, 2012 at 6:01 PM, Sergei Lebedev <
[email protected]
wrote:
Hello, Murtaza, can you please show us the code where you actually use
reg-form
?
Reply to this email directly or view it on GitHub:
#15 (comment)
from enfocus.
Related Issues (20)
- Need escape content in ef/content or make other function that do correct html escaping.
- transform object DocumentFragment to string HOT 5
- event handler functions within hiccup-html HOT 2
- replace-vars broken in clojurescript 1.7.145 HOT 6
- Great project
- Extractor extract node HOT 1
- Clone-for and lists HOT 15
- Hiccup input control - checked and disabled not working HOT 2
- Requiring enfocus.macros under Clojure 1.10 and above triggers an error
- compiling fails at target/cljsbuild-compiler-0/enfocus/core.cljs HOT 4
- get-prop doesn't work on data attributes HOT 1
- listen-live looses event information HOT 6
- Multiple Extractions HOT 5
- Add optional callback for when view-binding function completed HOT 6
- debug should be set to false by default HOT 4
- (read-form) on IE8 results in [object]is not ISeqable HOT 7
- How can I use holder.js in html snippet? HOT 4
- Difference in ef/content behaviour HOT 2
- clone-for issue "TypeError: enfocus.core.last_element_child is undefined" HOT 1
- Function based inline snippets HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from enfocus.