W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2010

Re: Seeking pre-LCWD comments for Indexed Database API; deadline February 2

From: Kris Zyp <kris@sitepen.com>
Date: Tue, 02 Feb 2010 12:48:41 -0700
Message-ID: <4B688199.6000606@sitepen.com>
To: Pablo Castro <Pablo.Castro@microsoft.com>
CC: Nikunj Mehta <nikunj@o-micron.com>, Arthur Barstow <art.barstow@nokia.com>, public-webapps <public-webapps@w3.org>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
 


On 2/1/2010 8:17 PM, Pablo Castro wrote:
> [snip]

>> the existence of currentTransaction in the same class).
>
>> "beginTransaction" would capture semantics more accurately. b.
>> ObjectStoreSync.delete: delete is a Javascript keyword, can we
>> use "remove" instead?
> I'd prefer to keep both of these as is. Since commit and abort are
> part of the transaction interface, using transaction() to denote
> the transaction creator seems brief and appropriate. As far as
> ObjectStoreSync.delete, most JS engines have or should be
> contextually reserving "delete". I certainly prefer delete in
> preserving the familiarity of REST terminology.
>
> [PC] I understand the term familiarity aspect, but this seems to be
> something that would just cause trouble. From a quick check with
> the browsers I had at hand, both IE8 and Safari 4 reject scripts
> where you try to add a method called ?delete? to an object?s
> prototype. Natively-implemented objects may be able to work-around
> this but I see no reason to push it. remove()  is probably equally
> intuitive. Note that the method ?continue? on async cursors are
> likely to have the same issue as continue is also a Javascript
> keyword.
>

You can't use member access syntax in IE8 and Safari 4 because they
only implement EcmaScript3. But obviously, these aren't the target
versions, the future versions would be the target of this spec. ES5
specifically contextually unreserves keywords, so obj.delete(id) is
perfectly valid syntax for all target browser versions. ES5 predates
Indexed DB API, so it doesn't make any sense to design around an
outdated EcmaScript behavior (also it is still perfectly possible to
set/call the delete property in ES3, you do so with object["delete"](id)).

- -- 
Kris Zyp
SitePen
(503) 806-1841
http://sitepen.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
 
iEYEARECAAYFAktogZkACgkQ9VpNnHc4zAytzgCeIssVuHKnsYaQ7Nd9Dhm5LxVN
K+EAn32wlsyD17GKDqIPonEKLqt6v9nm
=jTAo
-----END PGP SIGNATURE-----
Received on Tuesday, 2 February 2010 19:49:52 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:36 GMT