Reputation: 2204
the specs:
const unsigned short READ_ONLY = 0;
const unsigned short READ_WRITE = 1;
checking an webkitIDBTransaction.__ proto __
in google chrome's console:
READ_ONLY: 1
READ_WRITE: 0
I wonder if google chrome mis-implementing the indexeddb specs here?
Upvotes: 0
Views: 218
Reputation: 29208
IDBTransaction should have those properties directly, not inherit them via its prototype.
I cannot speak to previous versions but the webkitIDBTransaction.__proto__
object doesn't have READ_WRITE or any other transaction state constants today so it's possible the object you were looking at was the wrong prototype or, as you say, its prototype (which would be what though?) was incorrectly implemented.
In any case, these constants are fine in recent builds of Chrome:
console.log( webkitIDBTransaction.READ_ONLY );
> 0
console.log( webkitIDBTransaction.READ_WRITE );
> 1
Upvotes: 1