Re: [WebIDL] Constructor with too many arguments throws TypeError?

On 6/14/14, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> On 6/14/14, 1:49 PM, Dirk Schulze wrote:
>> If I have a constructor that takes 4 arguments. If I pass 5 arguments,
>> will it throw a TypeError exception?
>
> Per current WebIDL spec, no.
>
>> I am asking because the general behavior is not interoperable across
>> browsers today.
>
> I find that a bit surprising.  Which browser throws on _extra_ (as
> opposed to missing) arguments?
>
Chrome:
document.createElement("a", "b", "c").getAttribute("is")

document.createElement("a", "b").getAttribute("is");
-- 
Garrett
@xkit
ChordCycles.com
garretts.github.io

Received on Sunday, 15 June 2014 05:13:04 UTC