Skip to content

Commit 6f75aff

Browse files
darrnshntabatkins
authored andcommitted
Add validation to CSSVariableReferenceValue constructor (#617)
1 parent 41f2d09 commit 6f75aff

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

css-typed-om/Overview.bs

+5-1
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,11 @@ The <dfn for=CSSUnparsedValue>indexed getter</dfn> retrieves the string fragment
595595
when called,
596596
perform the following steps:
597597

598-
1. Return a new {{CSSVariableReferenceValue}}
598+
1. If |variable| is not a [=custom property name string=],
599+
[=throw=] a {{TypeError}},
600+
and exit this algorithm.
601+
602+
2. Return a new {{CSSVariableReferenceValue}}
599603
with its {{CSSVariableReferenceValue/variable}} internal slot
600604
set to |variable|
601605
and its {{CSSVariableReferenceValue/fallback}} internal slot

0 commit comments

Comments
 (0)