Until now, String.prototype.{trimLeft,trimRight} were non-standard language extensions, required for Web compatibility. The Stage 3 proposal at https://github.com/tc39/proposal-string-left-right-trim standardizes this functionality as String.prototype.{trimStart,trimEnd}, and defines String.prototype.{trimLeft,trimRight} as aliases for backwards compatibility. This patch implements that proposal behind the --harmony-string-trimming flag.


Editor's draft

Status in Chromium


Enabled by default (tracking bug) in:

  • Chrome for desktop release 66
  • Chrome for Android release 66
  • Android WebView release 66

Consensus & Standardization

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


Last updated on 2020-11-09