GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — lib: fix DOMException property descriptors after being lazy loaded · nodejs/node@671d2c0

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • lib/internal/bootstrap
    • browser.js
  • test
    • common
      • wpt.js
    • wpt
      • test-domexception.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎lib/internal/bootstrap/browser.js‎

Copy file name to clipboardExpand all lines: lib/internal/bootstrap/browser.js
+5-1Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,11 @@ exposeInterface(globalThis, 'URL', URL);
2626
exposeInterface(globalThis, 'URLSearchParams', URLSearchParams);
2727
exposeGetterAndSetter(globalThis,
2828
'DOMException',
29-
lazyDOMExceptionClass,
29+
() => {
30+
const DOMException = lazyDOMExceptionClass();
31+
exposeInterface(globalThis, 'DOMException', DOMException);
32+
return DOMException;
33+
},
3034
(value) => {
3135
exposeInterface(globalThis, 'DOMException', value);
3236
});
Collapse file

‎test/common/wpt.js‎

Copy file name to clipboardExpand all lines: test/common/wpt.js
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -503,6 +503,7 @@ class WPTRunner {
503503

504504
loadLazyGlobals() {
505505
const lazyProperties = [
506+
'DOMException',
506507
'Performance', 'PerformanceEntry', 'PerformanceMark', 'PerformanceMeasure',
507508
'PerformanceObserver', 'PerformanceObserverEntryList', 'PerformanceResourceTiming',
508509
'Blob', 'atob', 'btoa',
Collapse file

‎test/wpt/test-domexception.js‎

Copy file name to clipboardExpand all lines: test/wpt/test-domexception.js
+1-10Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,6 @@ const { WPTRunner } = require('../common/wpt');
44

55
const runner = new WPTRunner('webidl/ecmascript-binding/es-exceptions');
66

7-
runner.setFlags(['--expose-internals']);
8-
runner.setInitScript(`
9-
const { internalBinding } = require('internal/test/binding');
10-
const { DOMException } = internalBinding('messaging');
11-
Object.defineProperty(global, 'DOMException', {
12-
writable: true,
13-
configurable: true,
14-
value: DOMException,
15-
});
16-
`);
7+
runner.loadLazyGlobals();
178

189
runner.runJsTests();

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.