W3C home > Mailing lists > Public > public-script-coord@w3.org > April to June 2014

[WebIDL] Constructor with too many arguments throws TypeError?

From: Dirk Schulze <dschulze@adobe.com>
Date: Sat, 14 Jun 2014 17:49:35 +0000
To: "public-script-coord@w3.org" <public-script-coord@w3.org>
Message-ID: <CCA5E13A-3C0A-443A-827D-F797F59587AE@adobe.com>

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


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



	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.

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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:21 UTC