[w3c/IndexedDB] Restore DataError for equal keys with an open bound (PR #514)

# Restore DataError for equal keys with an open bound

Closes #510

## Summary

Add the missing `IDBKeyRange.bound()` step: if the converted keys are equal and either open flag is true, throw a `DataError` DOMException before creating a range. Equal keys with both bounds closed remain valid.

This restores the condition in [IndexedDB 1.0](https://www.w3.org/TR/2015/REC-IndexedDB-20150108/#widl-IDBKeyRange-bound-IDBKeyRange-any-lower-any-upper-boolean-lowerOpen-boolean-upperOpen). Thanks to @bcardarella for reporting the omission.

## Tests

* [x] Confirmed there are no Bikeshed errors or warnings: Bikeshed 7.2.1, before and after this change.
* [ ] Modified Web platform tests: WPT_PR_URL — replace after opening the companion PR.

The companion patch adds three equal-key/open-bound DataError cases and a closed/closed success control to `IndexedDB/idbkeyrange_incorrect.any.js`.

Locally, the changed file and the neighboring `idbkeyrange.any.js` and `idbkeyrange-includes.any.js` pass in headless Chrome 156.0.8078.47 and Firefox 159.0.1: 12 generated tests, 128 passing subtests per browser, across window, dedicated worker, shared worker and service worker. WPT lint passes for the changed file.

## Implementation status

These are observations, not implementation commitments:

* Chromium: the new cases pass locally in Chrome 156.0.8078.47.
* Gecko: the new cases pass locally in Firefox 159.0.1.
* WebKit: not run locally; #510 reports matching behavior.

No implementation change or commitment is requested by this PR.


<!--
    This comment and the below content is programmatically generated.
    You may add a comma-separated list of anchors you'd like a
    direct link to below (e.g. #idl-serializers, #idl-sequence):

    Don't remove this comment or modify anything below this line.
    If you don't want a preview generated for this pull request,
    just replace the whole of this comment's content by "no preview"
    and remove what's below.
-->
***
<a href="https://pr-preview.s3.amazonaws.com/ikram1201/IndexedDB/pull/514.html" title="Last updated on Nov 7, 2026, 4:32 PM UTC (4e883a2)">Preview</a> | <a href="https://pr-preview.s3.amazonaws.com/w3c/IndexedDB/514/f9f83f1...ikram1201:4e883a2.html" title="Last updated on Nov 7, 2026, 4:32 PM UTC (4e883a2)">Diff</a>
You can view, comment on, or merge this pull request online at:

  https://github.com/w3c/IndexedDB/pull/514

-- Commit Summary --

  * Restore DataError for equal keys with an open bound

-- File Changes --

    M index.bs (3)

-- Patch Links --

https://github.com/w3c/IndexedDB/pull/514.patch
https://github.com/w3c/IndexedDB/pull/514.diff

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/IndexedDB/pull/514
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/IndexedDB/pull/514@github.com>

Received on Saturday, 7 November 2026 16:32:19 UTC