script: Expose IDBVersionChangeEvent to worker globals. (#37573)

IDBVersionChangeEvent is already used internally from non-Window
globals, but the constructor wasn't set up to expose the interface
object in worker globals.

Testing: The effort involved in adding a test for this does not seem
worthwhile—we get this for free once we enable the indexeddb preference
while our interfaces.worker.js test is running.
Fixes: part of #6963

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
This commit is contained in:
Josh Matthews 2025-06-20 03:42:36 -04:00 committed by GitHub
parent b622157c10
commit 518729a4f5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 11 additions and 9 deletions

View file

@ -7,10 +7,8 @@
*
*/
// FIXME:(arihant2math) Expose to Worker too
// https://w3c.github.io/IndexedDB/#idbversionchangeevent
[Pref="dom_indexeddb_enabled", Exposed=(Window)]
[Pref="dom_indexeddb_enabled", Exposed=(Window,Worker)]
interface IDBVersionChangeEvent : Event {
constructor(DOMString type, optional IDBVersionChangeEventInit eventInitDict = {});