classList

< dom‎ | Element
Jump to: navigation, search

classList

This article is In Progress.


W3C Candidate Recommendation

Summary

Reflects the class attribute as an ordered list of the whitespace separated class names and has convenience methods for add, remove, contains and more.

Property of dom/Element

Syntax

Note: This property is read-only.

var classList = element.
  • Some part "<nowiki>...</nowiki>" of the query was not understood.
  • Some subquery has no valid condition.
;

Return Value

Returns an object of type .

A DOMTokenList representing the class names of the element.

Needs Examples: This section should include examples.



Related specifications

Specification Status Related Changes
WHATWG DOM Living Standard Section 9.1
DOM4 Working Draft Section 9.2

Compatibility

Desktop

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support ? ? ? ? ?

Mobile

Feature Android BlackBerry Chrome for mobile Firefox Mobile (Gecko) IE Mobile Opera Mobile Opera Mini Safari Mobile
Basic support ? ? ? ? ? ? ? ?

See also

Related pages (MSDN)

Attribution

This article contains content originally from external sources.

Portions of this content come from the Microsoft Developer Network: [Windows Internet Explorer API reference Article]