Boolean return value of DOMTokenList replace()

The DOM specification was updated so that DOMTokenList replace() returns a boolean value. This is useful for code which takes different paths depending on whether a replacement occurred, avoiding the need for an extra condition using contains().

Specification

Editor's draft

Status in Chromium

Blink>DOM


Enabled by default (tracking bug) in:

  • Chrome for desktop release 67
  • Chrome for Android release 67
  • Android WebView release 67
  • Opera release 54
  • Opera for Android release 54

Consensus & Standardization

After a feature ships in Chrome, the values listed here are not guaranteed to be up to date.

Owner

Last updated on 2018-03-23