ore('s');
    const r = s.openKeyCursor();
    r.onsuccess = t.step_func(() => {
      r.onsuccess = null;
      const cursor = r.result;
      cursor.continue();
      assert_throws_dom('InvalidStateError', () => {
        cursor.continue({not: "a valid key"});
      }, '"got value flag" check (InvalidStateError) should precede ' +
         '"invalid key" check (DataError)');
      t.done();
    });
  },
  'IDBCursor.continue exception order: InvalidStateError vs. DataError'
);

</script>
