Comments (6)
yep!
[:a {:href "cool" :some-attribute "blah"} "content"]
Edit: ah.. do you mean on the root tag?
from crate.
Yes, I need to add the attributes to the "html" tag itself:
This attribute doesn't do anything:
(html5 {:manifest "app.manifest"}
[:head
This leads to additional nested html tags.
(html5
[:html {:manifest "app.manifest"}
[:head
Thanks.
from crate.
did you mean hiccup? Crate is for Clojurescript, which by the time that would run would already have an html tag in place :)
https://github.com/weavejester/hiccup/
from crate.
Hi Chris,
I'm using Crate with clojurescript, I understand that it already has a html tag, the problem I have is I need to add attributes to the tag itself but as this is implicit I couldn't find a way to do this, if I add a map with the attributes after "(html5" it isn't included in the generated tag. Thanks, Mike
On 11 Aug 2012, at 10:07, Chris Granger wrote:
did you mean hiccup? Crate is for Clojurescript, which by the time that would run would already have an html tag in place :)
https://github.com/weavejester/hiccup/
—
Reply to this email directly or view it on GitHub.
from crate.
Sorry, stupid me, yes I'm referring to hiccup; I'm using Crate most of the time with ClojureScript and got mixing up where I was. Thanks again Mike
from crate.
There would be cases where there may be a dom ready and operating within, yet at the same time not the target our crate operations are pointed at. For example, my use-case writing asciidoctor plugin for LT, I had some issues with rendering in panel and wanted to write out a file using simple hiccup/crate html forms to .innerHTML
raw string (which means I can just always prefix the doctype root element so its no biggie, but I thought I'd share that I do think there are viable causes for this feature and which is reason why hiccup does actually include it - not that this should be an argument, just saying :)
I don't know...maybe my 'demands' are just quirky though. I also wanted to experiment and try to parse the rendered asciidoc output html back to a AST/parsed using some node.js libs, finally resorting to copying a few hickory cljs parts and enabling it for myself in this case. I recon crate suffices for 95% of the use-cases anyone currently has scaffolding UI elements in LT (and assuming that matters to begin with, no idea where else crate is used and how stable the API is, as 2013 was the last update and if much relies on its use, I imagine patching the missing features yourself or via plugin is the preferred route of least impact)
from crate.
Related Issues (13)
- Create git tags when releasing HOT 1
- Escaping of Tag Content HOT 3
- Select List Options HOT 1
- Clojars 0.2.0-alpha4 doesn't match with commit a08ef99ec99afb21ae5ce3d026c8b7a9d754d9eb HOT 1
- Inconsistent behavior of bound elements HOT 1
- Merge with Dommy?
- createElementNS unsupported in IE 8 and less HOT 1
- [:svg ...] converted to dom is not visible. HOT 2
- event listeners not created properly
- Inserting crate-generated element via jquery is puzzling HOT 9
- Move form/page helpers into new hiccup organization HOT 1
- error while using crate-0.2-alpha2
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 crate.