The replace() method of the DOMTokenList interface replaces an existing token with a new token.
replace()
MDN Reference