Ticket #2528188 (accepted enhancement)
ReporterSylvain Pasche |
Opened: 08/20/09 Last modified: 10/7/09 Status: accepted Type: enhancement |
Owner Matt Sweeney |
Target Release: FUTURE Priority: P3 (normal) |
|---|---|---|---|
| Summary: | Use element.classList if available to speed up class manipulation | ||
| Description: | Element.classList is a new API introduced in HTML5 for manipulating the classes of an element. The API is documented on https://developer.mozilla.org/en/DOM/element.classList. This API is implemented in Firefox 3.6 and WebKit is planning to implement it. YUI could detect if this property is available and use it in the YAHOO.util.Dom.{add,has,remove}Class functions. A speedup of up to 12 could be achieved with Firefox according to this benchmark: |
||
| Type: | enhancement | Observed in Version: | 2.x |
| Component: | Dom | Severity: | S4 (low) |
| Assigned To: | Matt Sweeney | Target Release: | FUTURE |
| Location: | Library Code | Priority: | P3 (normal) |
| Tags: | Relates To: | ||
| Browsers: | N/A | ||
| URL: | |||
| Test Information: | |||


I'm wary of implementing from a draft spec, especially if the feature does not exist in any A-grade browsers.
Leaving open to consider for future inclusion.