Re: [Optional] in parameters list

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/

Received on Friday, 8 April 2011 09:33:46 UTC