jeluard / lucuma

Web Components library for ClojureScript
96 stars 8 forks source link

Allow to define Web Components as function #25

Closed jeluard closed 10 years ago

jeluard commented 10 years ago

Web Components definitions could be parametrized to allow for more extensibility.

(defwebcomponent my-section
  [title]
  :host [:section {:title title})

(register (my-section "Some Title"))

defwebcomponent would then return a function that returns a map when called with the proper arguments.