From 1bfa1b3ea6fad95509cbeb4fb5d40b1be0678bca Mon Sep 17 00:00:00 2001 From: Xiaocheng Hu Date: Thu, 27 Jan 2022 15:52:33 -0800 Subject: [PATCH] Add type checking to `CSSNumericValue.parse` Fixes #1064 --- css-typed-om/Overview.bs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/css-typed-om/Overview.bs b/css-typed-om/Overview.bs index a2347c2b..8e6a41fe 100644 --- a/css-typed-om/Overview.bs +++ b/css-typed-om/Overview.bs @@ -1695,8 +1695,13 @@ rather than on {{CSSNumericValue}} instances. or a [=math function=], [=throw=] a {{SyntaxError}} and abort this algorithm. + + 3. If |result| is a <> + and [=creating a type=] from |result|'s unit returns failure, + [=throw=] a {{SyntaxError}} + and abort this algorithm. - 3. [=Reify a numeric value=] |result|, + 4. [=Reify a numeric value=] |result|, and return the result.