Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#18472 closed defect (wontfix)

rename class property to className

Reported by: [email protected] Owned by:
Priority: undecided Milestone: tbd
Component: Dijit Version: 1.10.4
Keywords: Cc:
Blocked By: Blocking:


Why dijit Button using class property instead of className?

This doesn't work.

new Button({ label : button.label, className : button.type, onClick : button.action})

This works fine.

new Button({ label : button.label, class : button.type, onClick : button.action})

Is it right?

Change History (1)

comment:1 Changed 7 years ago by bill

Component: Dijit - FormDijit
Resolution: wontfix
Status: newclosed
Summary: dijit/form/Button and classNamerename class property to className

Yes, probably we should have named it className, but it's named class. Perhaps to support declarative widgets more easily. Anyway it's not something that we can change now, because it would break the existing API.

Last edited 7 years ago by bill (previous) (diff)
Note: See TracTickets for help on using tickets.