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

[Bug 12248] Make objects first-class API citizens

From: <bugzilla@jessica.w3.org>
Date: Wed, 16 Mar 2011 02:56:20 +0000
To: public-script-coord@w3.org
Message-Id: <E1PzguK-0006qi-I9@jessica.w3.org>

--- Comment #31 from Cameron McCormack <cam@mcc.id.au> 2011-03-16 02:56:19 UTC ---
(In reply to comment #30)
> What do you mean by "isn't possible currently with
> interfaces-implemented-by-JS"?  In JavaScript, this is a property existence
> test that can be performed using Object.prototype.hasOwnProperty or
> Object.getOwnProperty.  This exact pattern is used quite extensively by the ES5
> Object.defineProperty to process its "options parameter".
> Are you saying that host object interfacing layers in browser don't provide the
> capability for such tests or is something else the issue?

I just mean that at the abstract IDL level, there is no concept of whether an
attribute was specified or not -- all attributes of a [Callback] interface
implemented by JS have a value, just by virtue of the wording currently in

So Web IDL, as part of fixing this bug, needs to map that
JS-property-present-or-not to something at the IDL level, so that
specifications can reference it in a language independent manner.

(This doesn't prevent specifications from writing JS-specific requirements if
they want to, but having Web IDL know about omitted keyword-param object
properties will make it easier for binding generators.)

Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
Received on Wednesday, 16 March 2011 02:56:21 UTC

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