[WebIDL] Constructor with too many arguments throws TypeError?

Hi,

If I have a constructor that takes 4 arguments. If I pass 5 arguments, will it throw a TypeError exception?

Example:

[Constructor(unrestricted double x, unrestricted double y,
             unrestricted double width, unrestricted double height)]
interface DOMRect : DOMRectReadOnly {

}

Is

	new DOMRect(1, 2, 3, 4, 5);

valid and creates a DOMRect object or should it throw a TypeError exception? I am asking because the general behavior is not interoperable across browsers today.

Greetings,
Dirk

Received on Saturday, 14 June 2014 17:50:06 UTC