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

[Bug 25050] Should Constructors behave like operations or (attribute) setters?

From: <bugzilla@jessica.w3.org>
Date: Fri, 14 Mar 2014 14:15:55 +0000
To: public-script-coord@w3.org
Message-ID: <bug-25050-3890-FM1zdv74Zp@http.www.w3.org/Bugs/Public/>

Boris Zbarsky <bzbarsky@mit.edu> changed:

           What    |Removed                     |Added
                 CC|                            |bzbarsky@mit.edu

--- Comment #1 from Boris Zbarsky <bzbarsky@mit.edu> ---
> if this is correct?

It's correct.  The normative spec for what calling a constructor does is at
http://heycam.github.io/webidl/#es-interface-call and directly invokes "convert
to an IDL value" on the arguments.  This will throw for an invalid value of an

> and for attributes assigning an invalid value is *ignored*.

This is done explicitly in http://heycam.github.io/webidl/#dfn-attribute-setter
which doesn't actually invoke "convert to an IDL value" in the enumeration

> as constructors set *attributes*

Not as far as WebIDL is concerned.  Any attribute setting a constructor might
do would happen in the "performing the actions listed in the description of
constructor with values as the argument values" step (step 5 in the "The
internal [[Call]] method of the interface object behaves as follows" steps,
which I sadly can't link to directly), while the handling of the constructor
arguments happens in step 4 of those same staps.

You are receiving this mail because:
You are on the CC list for the bug.
Received on Friday, 14 March 2014 14:16:05 UTC

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