source: frontend/node_modules/domexception/webidl2js-wrapper.js

Last change on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 11 days ago

Fix frontend appearance

  • Property mode set to 100644
File size: 600 bytes
Line 
1"use strict";
2const DOMException = require("./lib/DOMException.js");
3
4// Special install function to make the DOMException inherit from Error.
5// https://heycam.github.io/webidl/#es-DOMException-specialness
6function installOverride(globalObject) {
7 if (typeof globalObject.Error !== "function") {
8 throw new Error("Internal error: Error constructor is not present on the given global object.");
9 }
10
11 DOMException.install(globalObject);
12 Object.setPrototypeOf(globalObject.DOMException.prototype, globalObject.Error.prototype);
13}
14
15module.exports = {...DOMException, install: installOverride };
Note: See TracBrowser for help on using the repository browser.