W3C home > Mailing lists > Public > public-script-coord@w3.org > July to September 2013

Re: Feature-detectable API extensions?

From: Allen Wirfs-Brock <allen@wirfs-brock.com>
Date: Tue, 27 Aug 2013 15:03:52 -0700
Cc: Boris Zbarsky <bzbarsky@mit.edu>, public-script-coord <public-script-coord@w3.org>
Message-Id: <AFEAC8F3-77B4-48BF-BB09-ACE4BFC1E5A3@wirfs-brock.com>
To: Joshua Bell <jsbell@google.com>

On Aug 27, 2013, at 2:21 PM, Joshua Bell wrote:

> On Tue, Aug 27, 2013 at 2:12 PM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
> On 8/27/13 5:10 PM, Norbert Lindenberg wrote:
> Are there argument values for the second argument that are invalid and will result in an exception?
> In this case, yes: passing "" or 0 would throw.
> Is Norbert asking about the existing IDBCursor continue() method?
> The current IDL is |void continue(optional any key);| and extra arguments don't cause implementations to throw.

Getting back to Boris question concerning 'length'...

Based upon the above signature, IDBCursor.prototype.continue.length should be 0.  I verified this on FF.

void continue(any key, optional dictionary opts {string primaryKey);

according to the ES6 rules (assuming that the second argument is defined as a ES6 default value parameter) the value of the 'length' of the new form should be 1.

So the value of the 'length' property could be used to sniff for the new capability.

Received on Tuesday, 27 August 2013 22:04:26 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:18 UTC