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

https://www.w3.org/Bugs/Public/show_bug.cgi?id=25050

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
enumeration.

> 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
case.

> 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