From e4b1fb5e6422c1ff151234bb9de792d45dd88d87 Mon Sep 17 00:00:00 2001 From: XadillaX Date: Mon, 28 Jun 2021 16:29:54 +0800 Subject: [PATCH] lib: expose `DOMException` as global Refs: https://github.com/nodejs/node/issues/39098 PR-URL: https://github.com/nodejs/node/pull/39176 Fixes: https://github.com/nodejs/node/issues/39098 Reviewed-By: Antoine du Hamel Reviewed-By: Zijian Liu Reviewed-By: James M Snell --- .eslintrc.js | 1 + doc/api/globals.md | 10 ++++++++++ lib/.eslintrc.yaml | 2 ++ lib/internal/bootstrap/node.js | 17 ++++++++++++++++- lib/internal/util.js | 13 +++++++++---- test/parallel/test-global-domexception.js | 11 +++++++++++ test/wpt/test-atob.js | 2 -- test/wpt/test-url.js | 10 ---------- 8 files changed, 49 insertions(+), 17 deletions(-) create mode 100644 test/parallel/test-global-domexception.js diff --git a/.eslintrc.js b/.eslintrc.js index f5100fd3cc91b8..be332590ba7260 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -349,6 +349,7 @@ module.exports = { BigInt: 'readable', BigInt64Array: 'readable', BigUint64Array: 'readable', + DOMException: 'readable', Event: 'readable', EventTarget: 'readable', MessageChannel: 'readable', diff --git a/doc/api/globals.md b/doc/api/globals.md index 8ce4ff1942be27..2794009ffbd89a 100644 --- a/doc/api/globals.md +++ b/doc/api/globals.md @@ -380,6 +380,15 @@ added: v0.0.1 [`setTimeout`][] is described in the [timers][] section. +## `DOMException` + + + + +The WHATWG `DOMException` class. See [`DOMException`][] for more details. + ## `TextDecoder`