CSS.escape()
Widely available since 2022-07-15
The CSS.escape()
static method escapes a string so that it can be used in a valid CSS selector.
Learning resources on MDN
Browser support
- 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