Closed ljharb closed 9 years ago
My understanding is that you can't call Set
as a function, and that trying to pass the constructor a non-iterable object will throw. So that would give TypeError
, TypeError
, 3
, TypeError
. Can check spec to confirm...
Cleared it up - I misunderstood some of the spec WebIDL language. I'll clear up the TypeError messages in the shim so this is clearer.
The spec is clear but inconsistent on
Set([1, 2, 3])
versusSet(1, 2, 3)
versusnew Set([1, 2, 3])
versusnew Set(1, 2, 3)
- specifically, how many items do each of these have?The current spec seems to indicate the answers are
3
,TypeError
,1
, and3
, respectively.