W3C home > Mailing lists > Public > www-dom@w3.org > April to June 2013

[Future] First arguments should not be optional

From: Mounir Lamouri <mounir@lamouri.fr>
Date: Wed, 08 May 2013 18:23:15 +0100
Message-ID: <518A8A03.9010208@lamouri.fr>
To: www-dom@w3.org

This is an interface detail but there is no point in having the first
argument of then() catch() and done() optionals. The only benefit from
that is to be able to write code doing:


The only requirement I saw regarding having the first parameter optional
is in GitHub issue 22 [1] but it seems that doing .then(null) or
.then(undefined) should just work with current WebIDL.

It is kind of a detail because the worse thing that might happen is a
no-op but it seems useless to have a method being able to be called with
no argument at all on purpose.

[1] https://github.com/slightlyoff/DOMFuture/pull/22

Received on Wednesday, 8 May 2013 17:23:39 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:37:02 UTC