Re: questions: partial interfaces, text for WebIDL Constructor

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 UTC