tabatkins / css-toggle

Proposal for a CSS Toggle spec
Creative Commons Zero v1.0 Universal
28 stars 1 forks source link

CSSToggle() constructor should throw exception in same cases that setStates throws exception #30

Closed dbaron closed 2 years ago

dbaron commented 2 years ago

The CSSToggle constructor should throw an exception in the same cases (duplicate names) that setStates throws an exception.

(If it doesn't, then (a) it's not clear what to do and (b) it's not clear why setStates bothers to enforce this invariant.)