Re: RESpec:. Support for enums and callback functions?

On 15/11/2012 16:32 , Nilsson, Claes1 wrote:
> Trying to define:
>
> 1.enums. Supported in ReSpec?
>
> 2.callback function according to latest webidl specification. For example:
>
> callback AsyncOperationCallback = void (DOMString status);
>
> Supported in ReSpec?

Yes you can!

Enum:
       <dl id='enum-basic' class='idl' title='enum SuperStar'>
         <dt>one</dt>
         <dd>1 blah</dd>
         <dt>two</dt>
         <dd>2 blah</dd>
         <dt>three</dt>
         <dd>3 blah</dd>
       </dl>

Simple callback:
       <dl id='cb-basic' class='idl' title='callback SuperStar = void'></dl>

Complex callback:
       <dl id='cb-less-basic' class='idl' title='callback SuperStar = 
unsigned long long?'>
         <dt>optional any value</dt>
         <dd>blah</dd>
       </dl>

-- 
Robin Berjon - http://berjon.com/ - @robinberjon

Received on Monday, 3 December 2012 12:23:54 UTC