← Back to release summary

CSS.escape()

Category
CSS
Type
New or changed feature
Status
Enabled by default (Chrome 46)
Intent stage
None

Summary

`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.

Standards & signals

Docs: https://mathiasbynens.be/notes/css-escapes https://github.com/mathiasbynens/CSS.escape

Samples: https://googlechrome.github.io/samples/css-escape/index.html https://developer.mozilla.org/en-US/docs/Web/API/CSS/escape

View on chromestatus.com