[Optional] in parameters list

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[Optional] in parameters list

Hallvord Reiar Michaelsen Steen-3
Minor question: why is there a red X in the "optional" column here:
http://dev.w3.org/2006/webapi/clipops/clipops.html#widl-clipboardData-clearData
when it clearly has an [Optional] tag in the IDL?
--
Hallvord R. M. Steen, Core Tester, Opera Software
http://www.opera.com http://my.opera.com/hallvors/

Reply | Threaded
Open this post in threaded view
|

Re: [Optional] in parameters list

Robin Berjon-2
On Apr 7, 2011, at 22:12 , Hallvord R. M. Steen wrote:
> Minor question: why is there a red X in the "optional" column here:
> http://dev.w3.org/2006/webapi/clipops/clipops.html#widl-clipboardData-clearData
> when it clearly has an [Optional] tag in the IDL?

ReSpec (which I'm assuming you're using since I see the stylesheet and some artefacts) doesn't recognise [Optional], and in fact my understanding is that it's been dropped from WebIDL a while back. There is now an "optional" keyword for that. I think you want:

  boolean clearData (optional DOMString type);

Note that you can also skip the "in" since WebIDL doesn't have out or inout. (You can also tell ReSpec not to generate it by setting NoIDLIn to true — this might become the default at some point since it makes more sense).

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




Reply | Threaded
Open this post in threaded view
|

Re: [Optional] in parameters list

Hallvord Reiar Michaelsen Steen-3
On Fri, 08 Apr 2011 11:33:22 +0200, Robin Berjon <[hidden email]> wrote:

>   boolean clearData (optional DOMString type);

Thanks Robin, works indeed. I was working off examples from  
http://dev.w3.org/2009/dap/ReSpec.js/test-spec/webidl.html so perhaps you  
should correct instances of [Optional] there?

--
Hallvord R. M. Steen, Core Tester, Opera Software
http://www.opera.com http://my.opera.com/hallvors/