Closed webbedspace closed 9 years ago
Thanks, these messages are what current engines that implemented Map
/Set
threw, but now io.js
's v8 implements them correctly, I'll update them to use their messages.
In addition, you should (if possible) update it so that Map.call(new Map())
throws an error (ditto Set).
I'm not sure if that's possible - NewTarget
can't be shimmed or detected.
The error message for calling
Map
without a function is'Map does not accept arguments when called as a function'
, but it should really read'Map cannot be called as a function'
. Ditto Set.(In the current spec, Map will always throw without the
new
keyword, regardless of arguments.)