CSS.escape()

`CSS.escape()` serializes a string as a CSS identifier. This enables developers to easily and securely do things like escaping a string for use as part of a selector.

Demos

Documentation

Specification

Editor's draft

Status in Chromium

Blink


Enabled by default (tracking bug) in:

  • Chrome for desktop release 46
  • Chrome for Android release 46

Consensus & Standardization

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

  • Shipped
  • No public signals
  • No public signals
  • No signals

Owner

Last updated on 2017-06-14