Git Product home page Git Product logo

Comments (6)

ibdknox avatar ibdknox commented on June 17, 2024

yep!

[:a {:href "cool" :some-attribute "blah"} "content"]

Edit: ah.. do you mean on the root tag?

from crate.

milelo avatar milelo commented on June 17, 2024

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.

ibdknox avatar ibdknox commented on June 17, 2024

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.

milelo avatar milelo commented on June 17, 2024

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.

milelo avatar milelo commented on June 17, 2024

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.

clojens avatar clojens commented on June 17, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.