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.classList;

Return Value

Returns an object of type .

A DOMTokenList representing the class names of the element.


Compatibility

There is no data available for topic "webapi", feature "classList". If you think that there should be data available, consider opening an issue.

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

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]