|
Last change
on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 12 days ago |
|
Fix frontend appearance
|
-
Property mode
set to
100644
|
|
File size:
585 bytes
|
| Line | |
|---|
| 1 | "use strict";
|
|---|
| 2 | const legacyErrorCodes = require("./legacy-error-codes.json");
|
|---|
| 3 | const idlUtils = require("./utils.js");
|
|---|
| 4 |
|
|---|
| 5 | exports.implementation = class DOMExceptionImpl {
|
|---|
| 6 | constructor(globalObject, [message, name]) {
|
|---|
| 7 | this.name = name;
|
|---|
| 8 | this.message = message;
|
|---|
| 9 | }
|
|---|
| 10 |
|
|---|
| 11 | get code() {
|
|---|
| 12 | return legacyErrorCodes[this.name] || 0;
|
|---|
| 13 | }
|
|---|
| 14 | };
|
|---|
| 15 |
|
|---|
| 16 | // A proprietary V8 extension that causes the stack property to appear.
|
|---|
| 17 | exports.init = impl => {
|
|---|
| 18 | if (Error.captureStackTrace) {
|
|---|
| 19 | const wrapper = idlUtils.wrapperForImpl(impl);
|
|---|
| 20 | Error.captureStackTrace(wrapper, wrapper.constructor);
|
|---|
| 21 | }
|
|---|
| 22 | };
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.