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

Re: [Futures] accept/resolve/reject on a resolver don't have clearly defined behavior if no value is passed

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Thu, 06 Jun 2013 11:53:44 -0400
Message-ID: <51B0B088.20607@mit.edu>
To: Anne van Kesteren <annevk@annevk.nl>
CC: Cameron McCormack <cam@mcc.id.au>, DOM mailing list <www-dom@w3.org>
On 6/6/13 7:12 AM, Anne van Kesteren wrote:
> The behavior we want is equivalent to:
> function accept(value) { ... }
> accept()
> Which will result in value being undefined.

Sure, but the question is what arguments.length ends up being.  That's 
the only difference between "missing argument" and "argument explicitly 
passed as undefined" in JS.

If we plan to always pass explicit undefined to callbacks when we were 
accepted with no value, then we should make the callbacks take a 
non-optional "any", since they will in fact always get one.

Received on Thursday, 6 June 2013 15:54:14 UTC

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