Closed jeluard closed 9 years ago
Any comment? Is that something you would consider addressing? Thanks!
Yeah, I think this is definitely a reasonable thing to add! If you're interested in taking a stab at it, it should just be a small change to base-element
in template.cljs and compile-compound
in macros.clj:
https://github.com/Prismatic/dommy/blob/master/src/dommy/template.cljs#L32-L34 https://github.com/Prismatic/dommy/blob/master/src/dommy/macros.clj#L126
Great, I'll take a look then.
@jeluard thanks for contributing -- sorry to say we're deprecating templating. Please see https://github.com/Prismatic/dommy/pull/85
Let us know if you'd like to see templating maintained as a separate project!
Actually yes I would be interested in creating a separate project that would be based on the templating code and add some more features on top of it. Would that be fine from your side?
Definitely! Let me know if you need any help getting started.
Great! I'll let you know how it goes.
I pushed a first release that just bundle dommy templating code. Let me know if something looks incorrect.
@jeluard That's giving me a 404. Might it be a private repo?
Oups it should be public now.
I am curious to know why there was 2 versions of node
, one as a macro and one as a function. Is there a specific reason you would not want to use the macro one?
I think the function version was dead code that wasn't ever removed after the introduction of ->node-like
. It's probably not necessary anymore.
Custom Elements is a new w3c specification that introduces a new API to create DOM element: document.createElement(localName, typeExtension). This API reflects a new html syntax
<button is="my-button"></button>
wherebutton
would be the localName andmy-button
the typeExtension.The equivalent hiccup syntax
[:button {:is "my-button"}]
should generate the proper DOM call when used withdommy
to support this spec as settingis
as an attribute (current behavior) has no effect.