2.1.4 [W3C-INDEXEDDB-2] Section 4.3. The IDBFactory interface

V0017: Invalid values passed to the open function throw an InvalidAccessError, not a TypeError

The specification states:

 4.3. The IDBFactory interface
     Database objects are accessed through methods on the IDBFactory interface. ...
     …
         ...
         interface IDBFactory {
             [NewObject] IDBOpenDBRequest open(DOMString name,
                 optional [EnforceRange] unsigned long long version);
             …
         };
     ...
     The open(name, version) method, when invoked, must run these steps:
         1. If the value of version is 0 (zero), the implementation MUST throw a TypeError.
         …
         2. Queue a task to run these steps:
             1. If result is an error, set request’s result to undefined, set request’s 
                error to result, set request’s done flag, and fire an event named error at 
                request with its bubbles and cancelable attributes initialized to true.

EdgeHTML Mode

Invalid values passed to the open function throw an InvalidAccessError, not a TypeError.

V0015: The cmp function throws an "Invalid argument" exception, not a DataError exception

The specification states:

 4.3. The IDBFactory interface
     Database objects are accessed through methods on the IDBFactory interface. ...
     …
         ...
         interface IDBFactory {
             …
             short cmp (any first, any second);
         };
         ...
         result = indexedDB . cmp(key1, key2) 
  
             Compares two values as keys. Returns -1 if key1 precedes key2, 1 if key2 
             precedes key1, and 0 if the keys are equal. 
  
             Throws a "DataError" DOMException if either input is not a valid key.

EdgeHTML Mode

The cmp function throws an "Invalid argument" exception, not a DataError exception.

V0016: The deleteDatabase success event is of type Event, not IDBVersionChangeEvent

The specification states:

 4.3 The IDBFactory interface
     Database objects are accessed through methods on the IDBFactory interface. A single 
     object implementing this interface is present in the global scope of environments 
     that support Indexed DB operations.
     …
     The deleteDatabase(name) method, when invoked, must run these steps:
         …
         4. Run these steps in parallel:
            …
            2. Queue a task to run these steps:
               ...
               2. Otherwise, set request’s result to undefined, set request’s done flag, 
                  and fire a version change event named success at request with result and 
                  null.

EdgeHTML Mode

The deleteDatabase success event is of type Event, not IDBVersionChangeEvent.