Previously, replace() and toggle() would not always remove duplicates and whitespace from the DOM attribute in the case where they were no-ops (replacing a nonexistent token, force-toggling a token to its current state). Now they do. This matches the behavior of add() and remove(), and also replace() in one case (replacing an existing token with itself). This follows a spec change: https://github.com/whatwg/dom/pull/444 MozReview-Commit-ID: 7lDEQxOGxPV