Opened 13 years ago

Closed 11 years ago

#9747 closed enhancement (wontfix)

Use element.classList if available to speed up class manipulation

Reported by: spasche Owned by: Eugene Lazutkin
Priority: high Milestone: 1.7
Component: HTML Version: 1.3.2
Keywords: Cc:
Blocked By: Blocking:


Element.classList is a new API introduced in HTML5 for manipulating the classes of an element. The API is documented on

This API is implemented in Firefox 3.6 and WebKit is planning to implement it.

Dojo could detect if this property is available and use it in the {add,had,remove,toggle}Class functions. A 2-40 speedup could be achieved with Firefox according to this benchmark:

Change History (5)

comment:1 Changed 13 years ago by Eugene Lazutkin

Component: GeneralHTML
Milestone: tbdfuture
Owner: changed from anonymous to Eugene Lazutkin
Status: newassigned

comment:2 Changed 11 years ago by Eugene Lazutkin

Milestone: future1.7
Resolution: fixed
Status: assignedclosed

Done in [25704] of #9641.

comment:3 Changed 11 years ago by bill

See also duplicate ticket #11465.

comment:4 Changed 11 years ago by Eugene Lazutkin

Resolution: fixed
Status: closedreopened

It was reverted in [25745]. We decided to postpone it for now until vendors will ship better/faster implementations.

comment:5 Changed 11 years ago by Eugene Lazutkin

Resolution: wontfix
Status: reopenedclosed
Note: See TracTickets for help on using tickets.