Re: [DOM3 Events] optional capture argument in add/removeEventListener [ISSUE-134]

Jacob Rossi:
> In regards to the question raised in the telecon about how to specify
> optional parameters using WebIDL, Travis pointed out to me that there
> isn't really a way to do this explicitly in WebIDL. However it can be
> accomplished by specing an overload for add/removeEventListener which
> lacks the useCapture argument. Then there would be text explaining
> that calling this overload is equivalent to calling the 3-argument
> add/removeEventListener method with useCapture set to false.

Note that you can use the “optional” keyword to save writing an
explicit, second operation.  It is equivalent to having two operations,
but might save you some prose since there’s only one operation in the
IDL.

-- 
Cameron McCormack ≝ http://mcc.id.au/

Received on Thursday, 28 October 2010 23:05:10 UTC