W3C home > Mailing lists > Public > www-dom@w3.org > October to December 2010

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

From: Cameron McCormack <cam@mcc.id.au>
Date: Fri, 29 Oct 2010 12:04:32 +1300
To: Jacob Rossi <jrossi@microsoft.com>
Cc: "www-dom@w3.org" <www-dom@w3.org>
Message-ID: <20101028230432.GB10156@wok.mcc.id.au>
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

Cameron McCormack ≝ http://mcc.id.au/
Received on Thursday, 28 October 2010 23:05:10 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:16 UTC