IndexedDB: negative zero as keys/values

2011-09-16 Thread Joshua Bell
There appears to be a minor edge case in the IndexedDB draft ( http://www.w3.org/TR/IndexedDB) - and inconsistencies between implementations - for the ECMAScript negative zero number value. While the other numeric edge cases - NaN and +/-Infinity - are called out explicitly in the draft when

IndexedDB: API for enumerating databases within an origin

2011-09-21 Thread Joshua Bell
We've received feedback from early users of Chrome's implementation of IndexedDB requesting the ability to enumerate databases exist within an origin. We'd like the propose the following API addition to the IndexedDB API. TL;DR version: We add IDBFactory.getDatabaseNames() which asynchronously

IndexedDB: spec nit - IDBFactory.cmp returns int?

2011-09-30 Thread Joshua Bell
In the WebIDL snippet and description for IDBFactory, the cmp method is defined as returning int which isn't defined in WebIDL (that I can see); presumably this should be long or one of the other signed numeric types? (short, byte, long long, float, double)

IndexedDB: ordering sense of IDBFactory.cmp?

2011-10-03 Thread Joshua Bell
As we're implementing IDBFactory.cmp in WebKit we noticed that the ordering sense is reversed compared to C's strcmp/memcmp, Perl's cmp/= operators, etc. As currently spec'd, IDBFactory.cmp(first, second) returns 1 if first second C's memcmp/strcmp(first, second) return -1 if first second

Re: [IndexedDB] Passing an empty array to IDBDatabase.transaction

2011-10-17 Thread Joshua Bell
On Fri, Oct 14, 2011 at 4:02 PM, Israel Hilerio isra...@microsoft.comwrote: On Friday, October 14, 2011 3:57 PM, Jonas Sicking wrote: On Fri, Oct 14, 2011 at 2:57 PM, Israel Hilerio isra...@microsoft.com wrote: On Friday, October 14, 2011 2:43 PM, Jonas Sicking wrote: On Fri, Oct 14,

Re: [IndexedDB] IDBObjectStore.delete should accept a KeyRange

2011-10-26 Thread Joshua Bell
On Tue, Oct 25, 2011 at 4:50 PM, Israel Hilerio isra...@microsoft.comwrote: On Monday, October 24, 2011 7:40 PM, Jonas Sicking wrote: While I was there it did occur to me that the fact that the .delete function returns (through request.result in the async API) true/false depending on if

Re: [IndexedDB] Throwing when *creating* a transaction

2011-10-31 Thread Joshua Bell
On Mon, Oct 31, 2011 at 3:02 PM, Jonas Sicking jo...@sicking.cc wrote: Hi guys, Currently the spec contains the following sentence: Conforming user agents must automatically abort a transaction at the end of the scope in which it was created, if an exception is propagated to that scope.

[IndexedDB] Array keys / circular references

2011-11-01 Thread Joshua Bell
So far as I can see, Section 3.1.3 Keys doesn't seem to forbid circular references in keys which are Array objects, but this will obviously cause infinite loops in the comparison algorithm. This is in contrast to values, where the structured clone algorithm explicitly deals with cyclic references.

Re: [IndexedDB] Array keys / circular references

2011-11-01 Thread Joshua Bell
On Tue, Nov 1, 2011 at 10:35 AM, Jonas Sicking jo...@sicking.cc wrote: On Tue, Nov 1, 2011 at 9:24 AM, Joshua Bell jsb...@chromium.org wrote: I suggest an addition to the text e.g. However, an Array values is only a valid key if every item in the array is defined, if every item

IndexedDB: IDBIndex.multientry attribute?

2011-11-08 Thread Joshua Bell
Should IDBIndex (and IDBIndexSync) expose a readonly boolean multientry attribute reflecting the multientry flag of the index? The index's unique flag is exposed in this way. Is there a reason the multientry flag is not?

Re: [indexeddb] Keypath attribute lookup question

2011-11-12 Thread Joshua Bell
On Fri, Nov 11, 2011 at 5:07 PM, Israel Hilerio isra...@microsoft.comwrote: On Wednesday, November 09, 2011 4:47 PM, Joshua Bell wrote: On Wed, Nov 9, 2011 at 3:35 PM, Israel Hilerio isra...@microsoft.com wrote: In section 4.7 Steps for extracting a key from a value using a key path step #4

Re: [indexeddb] Keypath attribute lookup question

2011-11-15 Thread Joshua Bell
On Tue, Nov 15, 2011 at 11:42 AM, Jonas Sicking jo...@sicking.cc wrote: On Tue, Nov 15, 2011 at 9:09 AM, Joshua Bell jsb...@chromium.org wrote: I do however think that we should simply state that getting the index values will use the normal method for looking up properties on JS objects

Re: [indexeddb] Keypath attribute lookup question

2011-11-15 Thread Joshua Bell
On Tue, Nov 15, 2011 at 1:33 PM, Jonas Sicking jo...@sicking.cc wrote: On Tue, Nov 15, 2011 at 12:05 PM, Joshua Bell jsb...@chromium.org wrote: On Tue, Nov 15, 2011 at 11:42 AM, Jonas Sicking jo...@sicking.cc wrote: On Tue, Nov 15, 2011 at 9:09 AM, Joshua Bell jsb...@chromium.org wrote

Synchronous postMessage for Workers?

2011-11-17 Thread Joshua Bell
Jonas and I were having an offline discussing regarding the synchronous Indexed Database API and noting how clean and straightforward it will allow Worker scripts to be. One general Worker issue we noted - independent of IDB - was that there are cases where Worker scripts may need to fetch data

Re: Synchronous postMessage for Workers?

2011-11-17 Thread Joshua Bell
On Thu, Nov 17, 2011 at 11:28 AM, Glenn Maynard gl...@zewt.org wrote: We discussed a very similar thing about a year ago; I've been meaning to bring that up again, so this is probably as good a time as any. http://lists.w3.org/Archives/Public/public-webapps/2010OctDec/1075.html Ah, thanks -

IndexedDB: multientry or multiEntry?

2011-11-30 Thread Joshua Bell
Should the parameter used in IDBObjectStore.createIndex() and the property on IDBIndex be spelled multientry (as it is in the spec currently), or multiEntry (based on multi-entry as the correct English spelling)? Has any implementation shipped with the new name yet (vs. the old multirow)? Any

IndexedDB: calling IDBTransaction.objectStore() or IDBObjectStore.index() after transaction is finished?

2011-12-15 Thread Joshua Bell
Is there any particular reason why IDBTransaction.objectStore() and IDBObjectStore.index() should be usable (i.e. return values vs. raise exceptions) after the containing transaction has finished? Changing the spec so that calling these methods after the containing transaction has finished raises

Re: IndexedDB: calling IDBTransaction.objectStore() or IDBObjectStore.index() after transaction is finished?

2011-12-16 Thread Joshua Bell
On Fri, Dec 16, 2011 at 3:30 PM, Jonas Sicking jo...@sicking.cc wrote: On Fri, Dec 16, 2011 at 2:41 PM, Israel Hilerio isra...@microsoft.com wrote: On December 15, 2011 10:20 PM, Jonas Sicking wrote: On Thu, Dec 15, 2011 at 12:54 PM, Joshua Bell jsb...@chromium.org wrote: Is there any

Re: [Bug 15434] New: [IndexedDB] Detail steps for assigning a key to a value

2012-01-11 Thread Joshua Bell
On Wed, Jan 11, 2012 at 12:40 PM, Joshua Bell jsb...@chromium.org wrote: I thought this issue was theoretical when I filed it, but it appears to be the reason behind the difference in results for IE10 vs. Chrome 17 when running this test: http://samples.msdn.microsoft.com/ietestcenter

Re: [Bug 15434] New: [IndexedDB] Detail steps for assigning a key to a value

2012-01-11 Thread Joshua Bell
if there's precedent for one step vs. two step attribute assignment. ** Israel ** ** On Wednesday, January 11, 2012 12:42 PM, Joshua Bell wrote: *From:* jsb...@google.com [mailto:jsb...@google.com] *On Behalf Of *Joshua Bell *Sent:* Wednesday, January 11, 2012 12:42 PM

Re: String to ArrayBuffer

2012-01-11 Thread Joshua Bell
On Wed, Jan 11, 2012 at 3:12 PM, Kenneth Russell k...@google.com wrote: The StringEncoding proposal is the best path forward because it provides correct behavior in all cases. Adding String conversions directly to the typed array spec will introduce dependencies that are strongly undesirable,

Re: [Bug 15434] New: [IndexedDB] Detail steps for assigning a key to a value

2012-01-11 Thread Joshua Bell
I thought this issue was theoretical when I filed it, but it appears to be the reason behind the difference in results for IE10 vs. Chrome 17 when running this test: http://samples.msdn.microsoft.com/ietestcenter/indexeddb/indexeddb_harness.htm?url=idbobjectstore_add8.htm If I'm reading the test

Re: [indexeddb] Do we need to support keyPaths with an empty string?

2012-01-18 Thread Joshua Bell
On Wed, Jan 18, 2012 at 11:30 AM, Israel Hilerio isra...@microsoft.comwrote: On Friday, January 13, 2012 1:33 PM, Israel Hilerio wrote: Given the changes that Jonas made to the spec, on which other scenarios do we expect developers to specify a keyPath with an empty string (i.e. keyPath =

Re: [indexeddb] Do we need to support keyPaths with an empty string?

2012-01-18 Thread Joshua Bell
On Wed, Jan 18, 2012 at 1:51 PM, ben turner bent.mozi...@gmail.com wrote: On Wed, Jan 18, 2012 at 1:40 PM, Israel Hilerio isra...@microsoft.com wrote: We tested on Firefox 8.0.1 Ah, ok. We made lots of big changes to key handling that will be in 11 I think. If you're curious I would

Re: [indexeddb] Missing TransactionInactiveError Exception type for count and index methods

2012-01-23 Thread Joshua Bell
On Mon, Jan 23, 2012 at 4:12 PM, Israel Hilerio isra...@microsoft.comwrote: In looking at the count method in IDBObjectStore and IDBIndex we noticed that its signature doesn't throw a TransactionInactiveError when the transaction being used is inactive. We would like to add this to the spec.

Re: [Bug 15434] New: [IndexedDB] Detail steps for assigning a key to a value

2012-01-23 Thread Joshua Bell
with Eliot to unify the language and update the spec. ** ** Israel ** ** On Wednesday, January 11, 2012 3:45 PM, Joshua Bell wrote: On Wed, Jan 11, 2012 at 3:17 PM, Israel Hilerio isra...@microsoft.com wrote: We updated Section 3.1.3 with examples to capture the behavior

Re: [Bug 15434] New: [IndexedDB] Detail steps for assigning a key to a value

2012-01-24 Thread Joshua Bell
On Tue, Jan 24, 2012 at 2:21 AM, Jonas Sicking jo...@sicking.cc wrote: On Mon, Jan 23, 2012 at 5:34 PM, Joshua Bell jsb...@chromium.org wrote: There's another edge case here - what happens on a put (etc) request to an object store with a key generator when the object store's key path does

IndexedDB: Extra properties in optionalParameters objects

2012-01-24 Thread Joshua Bell
I noticed a test regarding optional parameters on http://samples.msdn.microsoft.com/ietestcenter/#indexeddb that IE10PP4 and Chrome 15 are marked as failing and Firefox 8 is marked as passing. (I have Chrome 18 and FF9 handy - no changes.) The specific test is IDBDatabase.createObjectStore() -

Re: [Bug 15434] New: [IndexedDB] Detail steps for assigning a key to a value

2012-01-25 Thread Joshua Bell
On Tue, Jan 24, 2012 at 11:38 AM, Jonas Sicking jo...@sicking.cc wrote: On Tue, Jan 24, 2012 at 8:43 AM, Joshua Bell jsb...@chromium.org wrote: On Tue, Jan 24, 2012 at 2:21 AM, Jonas Sicking jo...@sicking.cc wrote: What happens if a value higher up in the keyPath is not an object: store

Re: [IndexedDB] Key generation details

2012-01-25 Thread Joshua Bell
On Wed, Jan 25, 2012 at 3:05 PM, Israel Hilerio isra...@microsoft.comwrote: On Wednesday, January 25, 2012 12:25 PM, Jonas Sicking wrote: Hi All, Joshua reminded me of another thing which is undefined in the specification, which is key generation. Here's the details of how we do it in

Re: [indexeddb] Creating transactions inside the oncomplete handler of a VERSION_CHANGE transaction

2012-01-26 Thread Joshua Bell
On Wed, Jan 25, 2012 at 11:32 PM, Jonas Sicking jo...@sicking.cc wrote: On Wed, Jan 25, 2012 at 5:23 PM, Israel Hilerio isra...@microsoft.com wrote: On Wednesday, January 25, 2012 4:26 PM, Jonas Sicking wrote: On Wed, Jan 25, 2012 at 3:40 PM, Israel Hilerio isra...@microsoft.com wrote:

Re: autoincrement attribute on the object store

2012-01-31 Thread Joshua Bell
On Mon, Jan 30, 2012 at 8:51 AM, Kristof Degrave kristof.degr...@realdolmen.com wrote: I noticed that it isn’t possible to resolve if an object store is using auto increment for his key. This would be useful to determine when a key should or shouldn’t be provided when adding or putting

Re: [IndexedDB] Transactions during window.unload?

2012-02-21 Thread Joshua Bell
On Tue, Feb 21, 2012 at 1:40 PM, Joshua Bell jsb...@chromium.org wrote: In a page utilizing Indexed DB, what should the expected behavior be for an IDBTransaction created during the window.onunload event callback? e.g. window.onunload = function () { var transaction = db.transaction('my

Re: [IndexedDB] Numeric constants vs enumerated strings

2012-02-22 Thread Joshua Bell
On Wed, Feb 22, 2012 at 4:57 AM, Odin Hørthe Omdal odi...@opera.com wrote: I propose that we change the numeric constants to enumerated strings in the IndexedDB spec. Reasoning is echoing the reasoning that came up for WebRTC: http://lists.w3.org/Archives/**Public/public-script-coord/**

Re: [IndexedDB] Plans to get to feature complete [Was: Numeric constants vs enumerated strings ]

2012-02-28 Thread Joshua Bell
On Tue, Feb 28, 2012 at 10:51 AM, Odin Hørthe Omdal odi...@opera.comwrote: From: Jonas Sicking jo...@sicking.cc I think we've been feature complete for a while now. With one exception, which is that some error handling that we've discussed on the list needs to be edited into the spec.

Re: [IndexedDB] Multientry with invalid keys

2012-03-02 Thread Joshua Bell
On Thu, Mar 1, 2012 at 8:20 PM, Jonas Sicking jo...@sicking.cc wrote: Hi All, What should we do for the following scenario: store = db.createObjectStore(store); index = store.createIndex(index, x, { multiEntry: true }); store.add({ x: [a, b, {}, c] }, 1); index.count().onsuccess =

Re: [IndexedDB] Multientry and duplicate elements

2012-03-02 Thread Joshua Bell
On Thu, Mar 1, 2012 at 8:29 PM, Jonas Sicking jo...@sicking.cc wrote: Hi All, What should we do if an array which is used for a multiEntry index contains multiple entries with the same value? I.e. consider the following code: store = db.createObjectStore(store); index1 =

Re: [IndexedDB] Multientry with invalid keys

2012-03-02 Thread Joshua Bell
being added. ** ** Israel ** ** On Friday, March 02, 2012 8:59 AM, Joshua Bell wrote: On Thu, Mar 1, 2012 at 8:20 PM, Jonas Sicking jo...@sicking.cc wrote:*** * Hi All, What should we do for the following scenario: store = db.createObjectStore(store); index

Re: [IndexedDB] Multientry with invalid keys

2012-03-02 Thread Joshua Bell
Thanks. Based on this, I agree that in the multiEntry scenario at the start of this thread, 3 is the more consistent result. On Fri, Mar 2, 2012 at 5:29 PM, Israel Hilerio isra...@microsoft.comwrote: I’ve created a bug to track this issue:

Re: [IndexedDB] ReSpec.js changes appears to have broken the IndexedDB spec

2012-03-22 Thread Joshua Bell
(For those who are confused, I sent my reply from the wrong account so the copy to the list was eaten by the list filter. Jonas quoted everything I wrote, though, so no context is lost.) On Thu, Mar 22, 2012 at 9:55 AM, Jonas Sicking jo...@sicking.cc wrote: On Thursday, March 22, 2012, Joshua

IndexedDB: Key generators (autoIncrement) and Array-type key paths

2012-04-11 Thread Joshua Bell
Something I'm not seeing covered by the spec - what should the behavior be when inserting a value into an object store if the object store has a key generator and the key path is an Array? Should this be supported, or is it an error? e.g. what is alerted: var store =

Re: IndexedDB: Key generators (autoIncrement) and Array-type key paths

2012-04-12 Thread Joshua Bell
On Wed, Apr 11, 2012 at 10:56 PM, Jonas Sicking jo...@sicking.cc wrote: NEW: If the optionalParameters parameter is specified, and autoIncrement is set to true, and the keyPath parameter is specified to the empty string, or specified to an Array, this function must throw a

Re: [IndexedDB] Bug 14404: What happens when a versionchange transaction is aborted?

2012-05-04 Thread Joshua Bell
On Fri, May 4, 2012 at 2:04 PM, Jonas Sicking jo...@sicking.cc wrote: On Fri, May 4, 2012 at 1:19 PM, Israel Hilerio isra...@microsoft.com wrote: On Thursday, May 03, 2012 3:30 PM, Jonas Sicking wrote: On Thu, May 3, 2012 at 1:30 AM, Jonas Sicking jo...@sicking.cc wrote: Hi All,

Re: [IndexedDB] WebIDL-related spec nits

2012-06-11 Thread Joshua Bell
On Sun, Jun 10, 2012 at 7:45 PM, Kyle Huey m...@kylehuey.com wrote: (Note, I did not include the various things relating to keyPath that I mentioned last week, because I do not consider those to be trivial changes). Globally, the spec is inconsistent about whether the prose is in the same

Re: [IndexedDB] WebIDL-related spec nits

2012-06-11 Thread Joshua Bell
On Mon, Jun 11, 2012 at 10:09 AM, Anne van Kesteren ann...@annevk.nlwrote: On Mon, Jun 11, 2012 at 6:44 PM, Joshua Bell jsb...@chromium.org wrote: On Sun, Jun 10, 2012 at 7:45 PM, Kyle Huey m...@kylehuey.com wrote: IDBRequest.readyState should be an enum type, not a DOMString

[IndexedDB] Null argument for optionalParameters?

2012-06-26 Thread Joshua Bell
What should the behavior be in the following calls? db.createObjectStore('storename', null); db.createObjectStore('storename', undefined); store.createIndex('storename', 'keypath', null); store.createIndex('storename', 'keypath', undefined); As a reminder, the IDL for the final argument in both

WebIDL overload resolution, arrays and Nullable

2012-06-29 Thread Joshua Bell
Over in WebKit-land there's some disagreement about WebIDL method overload resolution, specifically around passing null, arrays (T[]) and the concept of Nullable. Here's an example where we're just not sure what the WebIDL spec dictates: void f(float[] x); // overload A void f(DOMString x); //

Re: WebIDL overload resolution, arrays and Nullable

2012-06-29 Thread Joshua Bell
On Fri, Jun 29, 2012 at 9:50 AM, Boris Zbarsky bzbar...@mit.edu wrote: On 6/29/12 12:25 PM, Joshua Bell wrote: void f(float[] x); // overload A void f(DOMString x); // overload B WebIDL itself, of course, doesn't dictate how matching and dispatching should be implemented Actually

Re: Firefox 16 will ship unprefixed IndexedDB

2012-07-10 Thread Joshua Bell
On Mon, Jul 9, 2012 at 9:13 PM, Jonas Sicking jo...@sicking.cc wrote: Hi All, Just wanted to give a status update regarding IndexedDB. Over the last few weeks we at Mozilla has combed through the spec and fixed any discrepancies that we found. The result is that we now think that we are up

Re: [IndexedDB] Implementation Discrepancies on 'prevunique' and 'nextunique' on index cursor

2012-10-03 Thread Joshua Bell
On Wed, Oct 3, 2012 at 1:13 AM, Odin Hørthe Omdal odi...@opera.com wrote: So, at work and with the spec in front of me :-) Odin claimed: There is a note near the algorithm saying something to that point, but the definite text is up in the prose let's explain IDB section IIRC. Nope,

IndexedDB: undefined parameters

2012-10-09 Thread Joshua Bell
We were looking at Opera's w3c-test submissions, and noticed that several of them use a pattern like: request = index.openCursor(undefined, 'prev'); or: opts = {}; request = index.openCursor(opts.range, opts.direction); In Chrome, these throw DataError per our interpretation of the spec: If

Re: IndexedDB: undefined parameters

2012-10-09 Thread Joshua Bell
On Tue, Oct 9, 2012 at 3:18 PM, Robert Ginda rgi...@chromium.org wrote: On Tue, Oct 9, 2012 at 3:11 PM, Boris Zbarsky bzbar...@mit.edu wrote: On 10/9/12 6:04 PM, Robert Ginda wrote: I'd suggest also treating null as missing if possible. In general, or for the specific IDB case? Well my

Re: IndexedDB: undefined parameters

2012-10-10 Thread Joshua Bell
On Wed, Oct 10, 2012 at 3:58 PM, Jonas Sicking jo...@sicking.cc wrote: On Wed, Oct 10, 2012 at 11:15 AM, Odin Hørthe Omdal odi...@opera.com wrote: Last time I looked at it, WebIDL said [TreatUndefinedAs=Missing] is meant to be for legacy API's, and not new ones. I think that a bit strange

Re: [IDB] Lifetime of IDB objects

2012-10-22 Thread Joshua Bell
On Mon, Oct 22, 2012 at 2:00 AM, Jonas Sicking jo...@sicking.cc wrote: On Sun, Oct 21, 2012 at 5:01 PM, João Eiras jo...@opera.com wrote: Hi ! The specification does not specify in detail what happens to several of the object types once they have reached their purpose. For

Re: Event.key complaints?

2012-11-01 Thread Joshua Bell
On Thu, Nov 1, 2012 at 11:58 AM, Ojan Vafai o...@chromium.org wrote: WebKit does not implement key/char, but does support keyIdentifier from an older version of the DOM 3 Events spec. It doesn't match the current key property in a number of ways (e.g. it has unicode values like U+0059), but

[IndexedDB] Attributes with undefined vs. null

2012-11-07 Thread Joshua Bell
Various atttributes in IndexedDB signal no value with |undefined|: IDBKeyRange.lowerBound (if not set) IDBKeyRange.upperBound (if not set) IDBRequest.result (on error, or on successful deleteDatabase/get with no value/delete/clear) IDBCursor.key (if no found record) IDBCursor.primaryKey (if no

Re: Two years on and still no sensible web storage solutions exist

2012-11-12 Thread Joshua Bell
AM, Joshua Bell jsb...@google.com wrote: Per the spec, anything the structured cloning algorithm [1] handles can be used as record values in IndexedDB. ArrayBuffers are not on that list, but Chrome does support them in IndexedDB. The TypedArray spec specifies how to structured clone

Re: Put request need created flag

2012-11-14 Thread Joshua Bell
On Wed, Nov 14, 2012 at 8:16 AM, Kyaw Tun kyaw...@yathit.com wrote: I have hard to understand how to use add method effectively. On my indexeddb wrapper library development, the wrapper database instance dispatches installable event for creating, deleting and updating a record. Interested

Re: random numbers API

2012-11-16 Thread Joshua Bell
On Fri, Nov 16, 2012 at 9:20 AM, Florian Bösch pya...@gmail.com wrote: I'll see that I can come up with a test suite that verifies statistical and runtime behavior of an array of algorithms implemented in JS, it'll probably take a while. Thank you! As a side benefit, having a library of

[IndexedDB] Closing connection in a versionchange transaction

2012-11-30 Thread Joshua Bell
A spec oddity that we noticed - if you explicitly close a connection during an upgradeneeded handler (or elsewhere in the transaction), the transaction should complete (not abort) yet the connection fails (error), upgrading the database but leaving you without a connection. Example: var req =

Re: [IndexedDB] Straw man proposal for moving spec along TR track

2012-12-10 Thread Joshua Bell
*crickets* Given the state of the open issues, I'm content to wait until an editor has bandwidth. I believe there is consensus on the resolution of the issues and implementations are already sufficiently interoperable so that adoption is not being hindered by the state of the spec, but should

Re: [IndexedDB] IDBKeyRange should have static functions

2013-01-22 Thread Joshua Bell
Very much appreciated. I've added this and the other 4 items from Ms2ger to https://www.w3.org/Bugs/Public/show_bug.cgi?id=17649 for tracking purposes, since there was some overlap with items in there already. On Sun, Jan 20, 2013 at 11:57 PM, Ms2ger ms2...@gmail.com wrote: Hi all, From the

Re: InedxedDB events : misconception?

2013-04-22 Thread Joshua Bell
Resending from the correct account: FWIW, we had a Chrome IDB bug report where someone used the developer tools to set a script breakpoint between the open() call and the event handler assignments. The debugger spins the event loop, so the event was dispatched before the handlers were

Re: InedxedDB events : misconception?

2013-04-22 Thread Joshua Bell
On Mon, Apr 22, 2013 at 1:57 PM, Kyle Huey m...@kylehuey.com wrote: On Mon, Apr 22, 2013 at 1:50 PM, Joshua Bell jsb...@chromium.org wrote: FWIW, we had a Chrome IDB bug report where someone used the developer tools to set a script breakpoint between the open() call and the event handler

Re: Why not be multiEntry and array keyPath togather?

2013-04-25 Thread Joshua Bell
Some of us were just discussing this yesterday - it does seem reasonable for the next iteration. Can you file a bug at https://www.w3.org/ (product: WebAppsWG, component: Indexed Database API) to track this? Including scenario details such as you've done above would be great. On Thu, Apr 25,

Re: [IndexedDB] request feedback on IDBKeyRange.inList([]) enhancement

2013-05-20 Thread Joshua Bell
On Mon, May 20, 2013 at 6:37 AM, Ben Kelly bke...@mozilla.com wrote: Thanks for the feedback! On May 19, 2013, at 9:25 PM, Kyaw Tun kyaw...@yathit.com wrote: IDBKeyRange.inList looks practically useful, but it can be achieve continue (continuePrimary) cursor iteration. Performance will be

Re: [IndexedDB] IDBRequest.onerror for DataCloneError and DataError

2013-05-20 Thread Joshua Bell
On Sun, May 19, 2013 at 6:37 PM, Kyaw Tun kyaw...@yathit.com wrote: Sorry for reposting again for http://lists.w3.org/Archives/Public/public-webapps/2013AprJun/0422.html Perhaps I am not well explain enough. In put and add method of object store and index, DataCloneError and DataError are

Re: [IndexedDB] request feedback on IDBKeyRange.inList([]) enhancement

2013-05-20 Thread Joshua Bell
On Mon, May 20, 2013 at 12:08 PM, Ben Kelly bke...@mozilla.com wrote: On May 20, 2013, at 1:39 PM, Joshua Bell jsb...@google.com wrote: On Mon, May 20, 2013 at 6:37 AM, Ben Kelly bke...@mozilla.com wrote: On May 19, 2013, at 9:25 PM, Kyaw Tun kyaw...@yathit.com wrote: IDBKeyRange.inList

Re: Updating Quota API: Promise, Events and some more

2013-08-14 Thread Joshua Bell
On Tue, Aug 13, 2013 at 10:57 PM, Kinuko Yasuda kin...@chromium.org wrote: Hi all, It's been a while since Quota API's FPWD (http://www.w3.org/TR/quota-api/) was published and we've gotten several requests/feedbacks so far. To address some of the requests and to gain more consensus, I'm

Re: [IndexedDB] blocked event should have default operation to close the connection

2013-10-09 Thread Joshua Bell
To do this in a backwards compatible way, we could add an option on open() that, if an upgrade is required, any other connections are forcibly closed; instead of a versionchange event the connections would be sent a close event, similar to the case in [1] Open question about whether the close

Re: IndexedDB, Blobs and partial Blobs - Large Files

2013-12-02 Thread Joshua Bell
On Mon, Dec 2, 2013 at 9:26 AM, Aymeric Vitte vitteayme...@gmail.comwrote: This is about retrieving a large file with partial data and storing it in an incremental way in indexedDB. ... This seems not efficient at all, was it never discussed the possibility to be able to append data

Re: IndexedDB, Blobs and partial Blobs - Large Files

2013-12-03 Thread Joshua Bell
, what's the best method? Regards, Aymeric [1] http://code.google.com/p/chromium/issues/detail?id=108012 Le 02/12/2013 23:38, Joshua Bell a écrit : On Mon, Dec 2, 2013 at 9:26 AM, Aymeric Vitte vitteayme...@gmail.comwrote: This is about retrieving a large file with partial data and storing

Re: IndexedDB, Blobs and partial Blobs - Large Files

2013-12-04 Thread Joshua Bell
case there will be extra book-keeping going on but no huge data copies. Regards Aymeric Le 03/12/2013 22:12, Jonas Sicking a écrit : On Tue, Dec 3, 2013 at 11:55 AM, Joshua Bell jsb...@google.com wrote: On Tue, Dec 3, 2013 at 4:07 AM, Aymeric Vitte vitteayme...@gmail.com wrote: I am

Re: IndexedDB: Syntax for specifying persistent/temporary storage

2013-12-06 Thread Joshua Bell
Thanks for sending this! On Fri, Dec 6, 2013 at 7:19 AM, Jan Varga jan.va...@gmail.com wrote: IndexedDB implementation in Firefox 26 (the current beta) supports a new storage type called temporary storage. In short, it's a storage with LRU eviction policy, so the least recently used data

Re: IndexedDB: Syntax for specifying persistent/temporary storage

2013-12-06 Thread Joshua Bell
On Fri, Dec 6, 2013 at 11:09 AM, Boris Zbarsky bzbar...@mit.edu wrote: On 12/6/13 1:29 PM, Joshua Bell wrote: // Throws TypeError on older implementations since Dictionary won't coerce to Number (?) Sure it will. It'll do ToNumber() and probably end up NaN (which becomes 0

Indexed DB: Opening connections, versions, and priority

2014-02-26 Thread Joshua Bell
While looking at a Chrome bug [1], I reviewed the Indexed DB draft, section 3.3.1 [2] Opening a database: These steps are not run for any other connections with the same origin and name but with a higher version And the note: This means that if two databases with the same name and origin, but

Re: Indexed DB: Opening connections, versions, and priority

2014-02-27 Thread Joshua Bell
On Thu, Feb 27, 2014 at 10:51 AM, Maciej Stachowiak m...@apple.com wrote: On Feb 26, 2014, at 10:35 AM, Joshua Bell jsb...@google.com wrote: While looking at a Chrome bug [1], I reviewed the Indexed DB draft, section 3.3.1 [2] Opening a database: These steps are not run for any other

Re: Indexed DB: Opening connections, versions, and priority

2014-02-28 Thread Joshua Bell
connections that are waiting. Again, all current implementations appear to do so as FIFO. On Thu, Feb 27, 2014 at 10:56 PM, Jonas Sicking jo...@sicking.cc wrote: On Wed, Feb 26, 2014 at 10:35 AM, Joshua Bell jsb...@google.com wrote: While looking at a Chrome bug [1], I reviewed the Indexed DB draft

Re: [IndexedDB] Transaction ordering for readonly transactions

2014-03-10 Thread Joshua Bell
On Fri, Mar 7, 2014 at 5:24 PM, Jonas Sicking jo...@sicking.cc wrote: Hi all, Currently the IndexedDB spec has strict requirements around the ordering for readwrite transactions. The spec says: If multiple readwrite transactions are attempting to access the same object store (i.e. if they

Re: indexedDB API grammatical error

2014-03-14 Thread Joshua Bell
Thanks, fixed. On Thu, Mar 13, 2014 at 2:42 PM, Danillo Paiva danillo.paiva.tol...@gmail.com wrote: 3.1.3 Keys (...) Operations that accept keys must perform as if each key parameter value, in order, is copied *by the by the* structured clone algorithm [HTML5] and the copy is instead

Re: [IndexedDB] Duplicate double quotes

2014-03-31 Thread Joshua Bell
Thanks, fixed in https://dvcs.w3.org/hg/IndexedDB/rev/9cbb21363f41 On Sun, Mar 30, 2014 at 10:22 PM, Zhang, Zhiqiang zhiqiang.zh...@intel.comwrote: 3.1.7 Transaction enum IDBTransactionMode { readonly, readwrite, versionchange };

Re: Starting work on Indexed DB v2 spec - feedback wanted

2014-04-17 Thread Joshua Bell
. -Tim Caswell On Wed, Apr 16, 2014 at 1:49 PM, Joshua Bell jsb...@google.com wrote: At the April 2014 WebApps WG F2F [1] there was general agreement that moving forward with an Indexed Database v2 spec was a good idea. Ali Alabbas (Microsoft) has volunteered to co-edit the spec with me

Re: IndexedDB Proposed API Change: cursor.advance BACKWARD when direction is prev

2014-05-21 Thread Joshua Bell
On Wed, May 21, 2014 at 7:32 AM, Arthur Barstow art.bars...@gmail.comwrote: [ Bcc www-tag ; Marc - please use public-webapps for IDB discussions ] On 5/20/14 7:46 PM, marc fawzi wrote: Hi everyone, I've been using IndexedDB for a week or so and I've noticed that cursor.advance(n) will

Re: IndexedDB Proposed API Change: cursor.advance BACKWARD when direction is prev

2014-05-23 Thread Joshua Bell
performance you can call continue() as early as possible so that the database can do its work while you're processing the previous result. What do you think? On Wed, May 21, 2014 at 10:42 AM, Joshua Bell jsb...@google.com wrote: On Wed, May 21, 2014 at 7:32 AM, Arthur Barstow art.bars

Re: IndexedDB Proposed API Change: cursor.advance BACKWARD when direction is prev

2014-05-27 Thread Joshua Bell
, Joshua Bell jsb...@google.com wrote: On Fri, May 23, 2014 at 9:40 AM, marc fawzi marc.fa...@gmail.comwrote: I thought .continue/advance was similar to the 'continue' statement in a for loop in that everything below the statement will be ignored and the loop would start again from the next

Indexed DB Transactions vs. Microtasks

2014-06-05 Thread Joshua Bell
Playing with Promise wrappers for IDB, the intersection of IDBTransaction's |active| state and microtask execution came up. Here are a couple of interesting cases: case 1: var tx; Promise.resolve().then(function() { tx = db.transaction(storeName); // tx should be active here...

Re: IndexedDB: MultiEntry index limited to 50 indexed values? Ouch.

2014-06-05 Thread Joshua Bell
The spec has no such limitation, implicit or explicit. I put this together: http://pastebin.com/0GLPxekE In Chrome 35, at least, I had no problems indexing 100,000 tags. (It's a bit slow, though, so the pastebin code has only 10,000 by default) You mention 50 items, which just happens to be how

Re: IDBObjectStore/IDBIndex.exists(key)

2014-06-23 Thread Joshua Bell
On Sat, Jun 21, 2014 at 9:45 PM, ben turner bent.mozi...@gmail.com wrote: I think this sounds like a fine idea. -Ben Turner On Sat, Jun 21, 2014 at 5:39 PM, Jonas Sicking jo...@sicking.cc wrote: Hi all, I found an old email with notes about features that we might want to put in v2.

Re: IDBObjectStore/IDBIndex.exists(key)

2014-06-23 Thread Joshua Bell
On Sat, Jun 21, 2014 at 7:02 PM, Marc Fawzi marc.fa...@gmail.com wrote: I think the same thought pattern can be applied elsewhere in the API design for v2. Consider the scenario of trying to find whether a given index exists or not (upon upgradeneeded). For now, we have to write noisy code

Re: IDBObjectStore/IDBIndex.exists(key)

2014-06-23 Thread Joshua Bell
On Mon, Jun 23, 2014 at 1:38 PM, Marc Fawzi marc.fa...@gmail.com wrote: No, I was suggesting .exists() can be synchronous to make it useful I referred to it as .contains() too so sorry if that conflated them for you but it has nothing to do with the .contains Joshua was talking about. In

Re: Blocking message passing for Workers

2014-08-12 Thread Joshua Bell
On Tue, Aug 12, 2014 at 3:54 PM, Glenn Maynard gl...@zewt.org wrote: On Tue, Aug 12, 2014 at 9:21 AM, David Bruant bruan...@gmail.com wrote: With C, Java and all, we already know where adding blocking I/O primitives leads to. Admittedly maybe dogma trying to learn from history. You still

Re: [IndexedDB] When is an error event dispatched at a transcation?

2015-02-05 Thread Joshua Bell
On Thu, Feb 5, 2015 at 12:58 PM, Glen Huang curvedm...@gmail.com wrote: The IDBTransaction interface exposes an onerror event handler. I wonder when that handler gets called? The algorithm of Steps for aborting a transaction” dispatches error events at requests of the transaction, but never

Re: Exposing structured clone as an API?

2015-04-24 Thread Joshua Bell
It seems like the OP's intent is just to deep-copy an object. Something like the OP's tweet... or this, which we use in some tests: function structuredClone(o) { return new Promise(function(resolve) { var mc = new MessageChannel(); mc.port2.onmessage = function(e) {

Re: Are there any plans to make IndexedDB and promises play nice?

2015-04-16 Thread Joshua Bell
On Thu, Apr 16, 2015 at 6:04 AM, Anne van Kesteren ann...@annevk.nl wrote: On Thu, Apr 16, 2015 at 12:04 AM, Jeremy Scheff jdsch...@gmail.com wrote: Currently, wrapping IndexedDB in promises is a perilous task. Pun intended, since the sticking point seems to be the distinction between

Re: Writing spec algorithms in ES6?

2015-06-11 Thread Joshua Bell
On Thu, Jun 11, 2015 at 1:45 PM, Ian Fette (イアンフェッティ) ife...@google.com wrote: To be honest this always drove me nuts when we were trying to do WebSockets. Having code is great for conformance tests, but a spec IMO should do a good job of setting out preconditions, postconditions, performance

DOMError - DOMException

2015-06-15 Thread Joshua Bell
Per previous discussions [1][2] highlighted in spec issues, we'd like to remove DOMError from the platform in favor of using DOMException. Sanity check: web-compat allowing, should we just swap DOMException in any place DOMError is currently used? I've done this (among other unvetted things) in

Re: RfC: Style Sheet for Technical Reports; deadline July 7

2015-05-29 Thread Joshua Bell
Let me start off proposing for the group and if I'm outvoted I can send personal feedback. :) Standard stylesheet: http://www.w3.org/TR/IndexedDB/ My tweaked styles: https://w3c.github.io/IndexedDB/ CSS changes are visible at: https://github.com/w3c/IndexedDB/blob/gh-pages/index.html#L79

Re: Cross-page locking mechanism for indexedDB/web storage/FileHandle ?

2015-07-15 Thread Joshua Bell
Based on similar feedback, I've been noodling on this too. Here are my current thoughts: https://gist.github.com/inexorabletash/a53c6add9fbc8b9b1191 Feedback welcome - I was planning to send this around shortly anyway. On Wed, Jul 15, 2015 at 3:07 AM, 段垚 duan...@ustc.edu wrote: Hi all, I'm

[IndexedDB] Spec Status Update

2015-10-20 Thread Joshua Bell
A quick pre-TPAC update on the status of Indexed DB for the Web Platform WG: The "first edition" of Indexed DB[1] became a W3C Recommendation in January 2015. Since then, the editors (Joshua Bell from Google and Ali Alabbas from Microsoft) have started work on a "second editio

Re: Indexed DB + Promises

2015-09-28 Thread Joshua Bell
g issue of mixing IDB+Promises remains. The proposal attempts to make code using IDB with async/await syntax approachable, while not entirely replacing the existing API. > > Sent from my iPhone > > On Sep 28, 2015, at 10:43 AM, Joshua Bell <jsb...@google.com> wrote: >

  1   2   >