Limited availability
The parse()
static method of the CSSNumericValue
interface converts a value string into an object whose members are value and the units.
CSSNumericValue.parse(cssText)
Parameters
cssText
a string containing numeric and unit parts.
SyntaxError
DOMException
TBD
The following returns a CSSUnitValue
object with a unit
property equal to "px"
and a value
property equal to 42
.
let numValue = CSSNumericValue.parse("42.0px");
Specifications Browser compatibility
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4