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:18:31 +0000
To: public-script-coord@w3.org
Message-ID: <bug-25050-3890-O9zYjwfC8v@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=25050

--- Comment #2 from Boris Zbarsky <bzbarsky@mit.edu> ---
Put another way, in pseudocode a WebIDL constructor looks like this:

  function myConstructor() {
    [f, args] = selectOverloadAndCoerceArgs(arguments);
    return f.call(args);
  }

where the behavior of "f" is defined by whatever specification is defining the
constructor (and might set attributes on the object, or do something else; who
knows) and the coercions performed to produce "args" are defined by WebIDL. 
The latter are what throws when an out-of-the-set value is passed for an
enumeration.

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

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:37:51 UTC