Note: This feature is available in Web Workers.
The div() method of the CSSNumericValue interface divides the CSSNumericValue by the supplied value.
div()
div(number1)
div(number1, number2)
div(number1, number2, /* …, */ numberN)number1, …, numberN OptionalEither a number or a CSSNumericValue.
A CSSMathProduct, or a CSSUnitValue if this and every argument are plain numbers, or all but one of them are.
TypeErrorThrown if an invalid type was passed to the method.
RangeErrorThrown if any of number1, …, numberN is, or resolves to, 0 or -0.
let mathProduct = CSS.px(24).div(CSS.percent(4));
// Prints "calc(24px / 4%)"
mathProduct.toString();