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 16098 - callback interfaces with constants should have no interface prototype object
Summary: callback interfaces with constants should have no interface prototype object
Status: RESOLVED 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-02-24 03:27 UTC by Cameron McCormack
Modified: 2012-03-01 05:38 UTC (History)
5 users (show)

See Also:


Attachments

Description Cameron McCormack 2012-02-24 03:27:22 UTC
Since there will never be instances of call back interfaces, there's no need for a .prototype property on their interface object (which exists only when there are constants on the call back interface).
Comment 1 Anne 2012-02-24 08:00:42 UTC
Is the method not exposed on the prototype?
Comment 2 Boris Zbarsky 2012-02-24 08:32:08 UTC
Exposed in what sense?
Comment 3 Travis Leithead [MSFT] 2012-02-24 19:50:40 UTC
This is 100% inline with IE9's behavior, so I'm happy to see this minor change. (At the time, we created an extended attribute to control this, but with 'callback' it's not necessary :)

// Introduced in DOM Level 2:
[msInterfaceObjectOnly]
interface NodeFilter 
{ /* ... */ };
Comment 4 Cameron McCormack 2012-03-01 05:16:39 UTC
Turns out this was already required.  The second paragraph in http://dev.w3.org/2006/webapi/WebIDL/#interface-object says "The interface object for non-callback interfaces must also have a property named “prototype” ...".
Comment 5 Boris Zbarsky 2012-03-01 05:28:56 UTC
That line doesn't say that callback interfaces _can't_ have such a property (jus that non-callback ones have to), and other places in the spec are written as if that property is never null....

I think it would be good to explicitly clarify this.
Comment 6 Cameron McCormack 2012-03-01 05:37:59 UTC
Fair enough, added this sentence below that paragraph:

  The interface object for a callback interface MUST NOT have a “prototype”
  property.