W3C home > Mailing lists > Public > spec-prod@w3.org > July to September 2011

Re: questions: partial interfaces, text for WebIDL Constructor

From: Robin Berjon <robin@berjon.com>
Date: Tue, 23 Aug 2011 14:36:23 +0200
Cc: spec-prod@w3.org
Message-Id: <B1E40EE4-C43F-4743-9563-092B39802046@berjon.com>
To: Dan Burnett <dburnett@voxeo.com>
Hi,

sorry for the delay in replying, I've been on vacation.

On Aug 1, 2011, at 22:17 , Dan Burnett wrote:
> 1) Specifying a "partial interface" seems to result in a failure.  In particular, specifying
> 
> partial interface URL {
>  static DOMString createObjectURL(in MediaStream stream);
> };
> 
> as 
> 
> 
> <dl title='partial interface URL' class='idl'>
>  <dt>static DOMString createObjectURL (in MediaStream stream)</dt>
>  <dd>Text description here</dd>
> </dl>
> 
> gives me the following error:
> 
> 	 Expected definition, got: partial interface URL
> 	 Processing error: [Exception... "Component returned failure code: 0x80004003 (NS_ERROR_INVALID_POINTER) [nsIDOMDocumentFragment.appendChild]" nsresult: "0x80004003 (NS_ERROR_INVALID_POINTER)" location: "JS frame :: file:///Users/burn/Documents/webrtc/2009/dap/ReSpec.js/js/respec.js :: anonymous :: line 1976" data: no]
> 
> Are partial interfaces not supported?

No, they're not. ReSpec isn't yet up to date with the latest and greatest WebIDL (also, features tend to get added when someone complains that they're not there :). I should be getting around to adding support for this shortly, please let me know if there are specific ways in which you'd like such interfaces to be rendered.

(Please note that you can use http://code.w3.org/respec/ to enter issues as well)

> 2)  I would like to provide a text description for the constructor method ("new Blah") itself, but I haven't yet found a way.  Has anyone else figured out a way to get the constructor itself to show up in the list of methods, with a way to provide descriptive text for it?
> 
> For example, using the extended attribute example in the WebIDL testing document (http://dev.w3.org/2009/dap/ReSpec.js/test-spec/webidl.html#extended-attribute), if I wanted to provide a description of the behavior of "new Dahut" along with the IDL, how would I?

This is also not supported. To date I think people have mostly used free-text descriptions of the interface. I'm happy to add support for this as well, but I'd be thankful for syntax suggestions. Since you have the need at hand, what would be the most natural way for you to mark this up?

-- 
Robin Berjon - http://berjon.com/ - @robinberjon
Received on Tuesday, 23 August 2011 12:36:48 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 10 March 2012 06:19:18 GMT