Skip to content

Commit

Permalink
Theory 2: event.preventDefault()
Browse files Browse the repository at this point in the history
  • Loading branch information
joeyparrish committed Feb 26, 2025
1 parent dadd39a commit 67d9d04
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 12 deletions.
2 changes: 0 additions & 2 deletions lib/offline/indexeddb/db_operation.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,9 @@ shaka.offline.indexeddb.DBOperation = class {
// |event.preventDefault()| is used on all non-successful callbacks to
// prevent Firefox from surfacing the error on the main thread.
transaction.onabort = (event) => {
event.preventDefault();
this.promise_.reject();
};
transaction.onerror = (event) => {
event.preventDefault();
this.promise_.reject();
};
transaction.oncomplete = (event) => {
Expand Down
6 changes: 0 additions & 6 deletions lib/offline/indexeddb/storage_mechanism.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,6 @@ shaka.offline.indexeddb.StorageMechanism = class {
shaka.util.Error.Code.INDEXED_DB_ERROR,
open.error));
timeOutTimer.stop();

// Firefox will raise an error on the main thread unless we stop it here.
event.preventDefault();
};

return p;
Expand Down Expand Up @@ -350,9 +347,6 @@ shaka.offline.indexeddb.StorageMechanism = class {
shaka.util.Error.Category.STORAGE,
shaka.util.Error.Code.INDEXED_DB_ERROR,
del.error));

// Firefox will raise an error on the main thread unless we stop it here.
event.preventDefault();
};

return p;
Expand Down
4 changes: 0 additions & 4 deletions test/test/util/canned_idb.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,6 @@ shaka.test.CannedIDB = class {
};

request.onerror = (event) => {
event.preventDefault();
reject(request.error);
};
});
Expand Down Expand Up @@ -238,7 +237,6 @@ shaka.test.CannedIDB = class {
};

request.onerror = (event) => {
event.preventDefault();
resolve();
};
});
Expand Down Expand Up @@ -300,7 +298,6 @@ shaka.test.CannedIDB = class {
};

request.onerror = (event) => {
event.preventDefault();
reject(request.error);
};
});
Expand Down Expand Up @@ -341,7 +338,6 @@ shaka.test.CannedIDB = class {

transaction.onerror = (event) => {
reject(event.error);
event.preventDefault();
};
});
}
Expand Down

0 comments on commit 67d9d04

Please sign in to comment.