A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developer.cdn.mozilla.net/en-US/docs/Web/API/CSSNumericValue/to below:

CSSNumericValue: to() method - Web APIs

CSSNumericValue: to() method

Limited availability

The to() method of the CSSNumericValue interface converts a numeric value from one unit to another.

Syntax Parameters
unit

The unit to which you want to convert.

Return value

A CSSMathSum.

Exceptions
SyntaxError DOMException

Thrown if an invalid type was passed to the method.

TypeError

Thrown if the passed values cannot be summed.

Examples

js

// Prints "0.608542cm"
console.log(CSS.px("23").to("cm").toString());
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