replace
Description
The replace of DOMTokenList for JS replaces token with newToken.
Returns true if token was replaced with newToken; otherwise false.
Throws a "SyntaxError" DOMException if one of the arguments is the empty string.
Throws an "InvalidCharacterError" DOMException if one of the arguments contains any ASCII whitespace.
Syntax
tokenlist.replace(token, newToken)
Parameters
token
A string.
newToken
A string.