Sha256: 07ce25ebcd3c5dddad971b70a1381f3c059ef737ab4ed61876f3cea8d62a4ebb
Contents?: true
Size: 1.07 KB
Versions: 26
Compression:
Stored size: 1.07 KB
Contents
"use strict"; const idlUtils = require("../generated/utils"); const legacyErrorCodes = { IndexSizeError: 1, HierarchyRequestError: 3, WrongDocumentError: 4, InvalidCharacterError: 5, NoModificationAllowedError: 7, NotFoundError: 8, NotSupportedError: 9, InUseAttributeError: 10, InvalidStateError: 11, SyntaxError: 12, InvalidModificationError: 13, NamespaceError: 14, InvalidAccessError: 15, TypeMismatchError: 17, SecurityError: 18, NetworkError: 19, AbortError: 20, URLMismatchError: 21, QuotaExceededError: 22, TimeoutError: 23, InvalidNodeTypeError: 24, DataCloneError: 25 }; exports.implementation = class DOMExceptionImpl { constructor(globalObject, [message, name]) { this.name = name; this.message = message; } get code() { return legacyErrorCodes[this.name] || 0; } }; // A proprietary V8 extension that causes the stack property to appear. exports.init = impl => { if (Error.captureStackTrace) { const wrapper = idlUtils.wrapperForImpl(impl); Error.captureStackTrace(wrapper, wrapper.constructor); } };
Version data entries
26 entries across 26 versions & 1 rubygems