Get to know MDN better
This feature is not Baseline because it does not work in some of the most widely-used browsers.
The parse() static method of the CSSNumericValue interface converts a value string into an object whose members are value and the units.
a string containing numeric and unit parts.
TBD
The following returns a CSSUnitValue object with a unit property equal to "px" and a value property equal to 42.
| CSS Typed OM Level 1 # dom-cssnumericvalue-parse |
Enable JavaScript to view this browser compatibility table.
This page was last modified on Jun 12, 2023 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.