Skip to content

Commit

Permalink
Setting/modifiying value to empty string throws a TypeError (#531)
Browse files Browse the repository at this point in the history
  • Loading branch information
nainar authored and tabatkins committed Jan 28, 2018
1 parent 9697e73 commit 9c9bdcc
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion css-typed-om/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,9 @@ interface CSSKeywordValue : CSSStyleValue {
when called,
perform the following steps:

1. Return a new {{CSSKeywordValue}}
1. If |value| is an empty string [=throw=] a {{TypeError}}
and exit this algorithm.
2. Otherwise, return a new {{CSSKeywordValue}}
with its {{CSSKeywordValue/value}} internal slot
set to |value|.
</div>
Expand All @@ -555,6 +557,18 @@ typedef (DOMString or CSSKeywordValue) CSSKeywordish;
set to |val|.
</div>

<div algorithm="CSSKeywordValue.value">
The <dfn attribute for=CSSKeywordValue>value</dfn> attribute of a {{CSSKeywordValue}} |this| must,
on setting a value |value|,
perform the following steps:

1. If |value| is an empty string, [=throw=] a {{TypeError}},
and exit this algorithm.

2. Otherwise, set |this|’s {{CSSKeywordValue/value}} internal slot,
to |value|.
</div>


<!--
██ ██ ██ ██ ██ ██ ████████ ████████ ████ ██████
Expand Down

0 comments on commit 9c9bdcc

Please sign in to comment.