CSS.escape()
Widely available
The CSS.escape()
static method escapes a string so that it can be used in a valid CSS selector.
To learn more, see
CSS: escape() static method at MDN.
Compatibility
- Chrome 46 Released on 2015-10-13
- Chrome Android 46 Released on 2015-10-14
- Edge 79 Released on 2020-01-15
- Firefox 31 Released on 2014-07-22
- Firefox for Android 31 Released on 2014-07-22
- Safari 10.1 Released on 2017-03-27
- Safari on iOS 10.3 Released on 2017-03-27