This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 17722 - All interface objects should have a 'length' property
Summary: All interface objects should have a 'length' property
Status: CLOSED FIXED
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: WebIDL (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Cameron McCormack
QA Contact: public-webapps-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-09 11:20 UTC by Ms2ger
Modified: 2012-07-10 08:29 UTC (History)
4 users (show)

See Also:


Attachments

Description Ms2ger 2012-07-09 11:20:40 UTC
In V8, Opera and Gecko's new bindings, they have a 'length' property set to 0. In IE and old Gecko, they don't have one.
Comment 1 Anne 2012-07-09 11:34:06 UTC
Safari 5.1.7 also does not have one.
Comment 2 Boris Zbarsky 2012-07-10 06:43:58 UTC
Per spec, interface objects are always functions, functions in ES5 have a length.  WebIDL's only business here is defining what that length should be.  It does so for cases when there is a [Constructor]; presumably this bug is about the cases when there isn't one?
Comment 3 Cameron McCormack 2012-07-10 07:25:09 UTC
Right, and it should be 0 in that case.

http://dev.w3.org/cvsweb/2006/webapi/WebIDL/Overview.xml.diff?r1=1.559;r2=1.560;f=h
Comment 4 Ms2ger 2012-07-10 08:29:24 UTC
(In reply to comment #2)
> Per spec, interface objects are always functions, functions in ES5 have a
> length.  WebIDL's only business here is defining what that length should be. 
> It does so for cases when there is a [Constructor]; presumably this bug is
> about the cases when there isn't one?

And the fact that I was confused by the phrasing.

(In reply to comment #3)
> Right, and it should be 0 in that case.
> 
> http://dev.w3.org/cvsweb/2006/webapi/WebIDL/Overview.xml.diff?r1=1.559;r2=1.560;f=h

Thanks.