This page is Ready to Use

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

remove

Summary

Removes one or more tokens from a DOMTokenList.

Method of dom/DOMTokenListdom/DOMTokenList

Syntax

var result = element.remove(token);

Parameters

token

Data-type
String

The token to remove from the DOMTokenList.

Return Value

Returns an object of type BooleanBoolean

Examples

//removes an item from an element's classList (a DOMTokenList)
function elRemItem(elid,itemrem) {
  var classes = document.getElementById(elid).classList;
  classes.remove(itemrem);
}

Related specifications

W3C DOM4
Candidate Recommendation