diff --git a/ext/web/01_dom_exception.js b/ext/web/01_dom_exception.js index d654d07317f7ea..796ba38f808a34 100644 --- a/ext/web/01_dom_exception.js +++ b/ext/web/01_dom_exception.js @@ -82,7 +82,6 @@ const nameToCodeMapping = ObjectCreate(null, { NetworkError: { value: NETWORK_ERR }, AbortError: { value: ABORT_ERR }, URLMismatchError: { value: URL_MISMATCH_ERR }, - QuotaExceededError: { value: QUOTA_EXCEEDED_ERR }, TimeoutError: { value: TIMEOUT_ERR }, InvalidNodeTypeError: { value: INVALID_NODE_TYPE_ERR }, DataCloneError: { value: DATA_CLONE_ERR }, diff --git a/tests/unit/dom_exception_test.ts b/tests/unit/dom_exception_test.ts index 82138d78428cab..8aad75fcbd5cff 100644 --- a/tests/unit/dom_exception_test.ts +++ b/tests/unit/dom_exception_test.ts @@ -30,3 +30,11 @@ Deno.test(function hasStackAccessor() { assert(typeof desc.get === "function"); assert(typeof desc.set === "function"); }); + +Deno.test(function quotaExceededErrorCodeIsZero() { + // Per https://github.com/whatwg/webidl/pull/1465, QuotaExceededError is no + // longer in the DOMException error names table, so its code should be 0. + const e = new DOMException("test", "QuotaExceededError"); + assertEquals(e.code, 0); + assertEquals(e.name, "QuotaExceededError"); +});