jeluard / lucuma

Web Components library for ClojureScript
96 stars 8 forks source link

Unify property, attribute and events #19

Closed jeluard closed 10 years ago

jeluard commented 10 years ago

Investigate how feasible it is. Ideally modifying a property should change associated attribute and fire an event, if feasible.

jeluard commented 10 years ago

New syntax will be:

(defwebcomponent my-component
  :attributes {:attribute1 "default"
               :attribute2 {:default 2 :type js/Number :events? true :attributes? true}})

With events? and attributes? defaulting to true and type being inferred from (non-optional) default.