--- node_modules/jsdom/lib/jsdom.js 2025-10-18 19:25:36.486580000 +0300 +++ jsdom-qjs/jsdom.js 2025-10-18 22:23:22.637363300 +0300 @@ -31876,7 +31876,7 @@ } else if (global.setImmediate) { nextTick = global.setImmediate; } else { - nextTick = global.setTimeout; + nextTick = global.setTimeout } return nextTick; } @@ -42052,7 +42052,7 @@ self.emit('error', reason) }) } else { - var xhr = self._xhr = new global.XMLHttpRequest() + var xhr = self._xhr = new XMLHttpRequest() try { xhr.open(self._opts.method, self._opts.url, true) } catch (err) { @@ -44670,66 +44670,58 @@ 'decodeURI', 'decodeURIComponent', 'encodeURI', 'encodeURIComponent', 'escape', 'eval', 'isFinite', 'isNaN', 'parseFloat', 'parseInt', 'undefined', 'unescape']; -function Context() {} -Context.prototype = {}; + + function Context() { } + Context.prototype = {}; + function sandbox(fn) { + + var keys = {}; + + for (var k in globalThis) { + keys[k] = globalThis[k] + } + + var result = fn(); + + for (var k in globalThis) { + if(keys[k]!=globalThis[k]){ + globalThis[k]=keys[k] + } + } -var Script = exports.Script = function NodeScript (code) { + return result; + } + var Script = exports.Script = function NodeScript(code) { if (!(this instanceof Script)) return new Script(code); this.code = code; -}; - -Script.prototype.runInContext = function (context) { - if (!(context instanceof Context)) { - throw new TypeError("needs a 'context' argument."); - } - - var iframe = document.createElement('iframe'); - if (!iframe.style) iframe.style = {}; - iframe.style.display = 'none'; - - document.body.appendChild(iframe); - - var win = iframe.contentWindow; - var wEval = win.eval, wExecScript = win.execScript; - - if (!wEval && wExecScript) { - // win.eval() magically appears when this is called in IE: - wExecScript.call(win, 'null'); - wEval = win.eval; - } - - forEach(Object_keys(context), function (key) { - win[key] = context[key]; - }); - forEach(globals, function (key) { - if (context[key]) { - win[key] = context[key]; - } - }); - - var winKeys = Object_keys(win); + }; - var res = wEval.call(win, this.code); - - forEach(Object_keys(win), function (key) { - // Avoid copying circular objects like `top` and `window` by only - // updating existing context properties or new properties in the `win` - // that was only introduced after the eval. - if (key in context || indexOf(winKeys, key) === -1) { - context[key] = win[key]; - } + Script.prototype.runInContext = function (context) { + let code = 'with(context){\n' + const keys = Object.keys(context); + for (const key of keys) { + code += `globalThis[${JSON.stringify(key)}] = context[${JSON.stringify(key)}];\n`; + } + let src = this.code; + if (/["']use strict["'];?/.test(src)) { + src = src.replace(/(["'])use strict\1/g,"$1use loose$1") + } + + if (typeof src !== 'string') { + src = `(${src.toString()})()`; + } + code += src +';\n'; + // for (const key of keys) { + // code += `context[${JSON.stringify(key)}] = globalThis[${JSON.stringify(key)}];\n`; + // } + code += "}" + return sandbox(() => { + //eval.bind(context).call(code) + Function('context', code).call(null, context); + return context; }); + }; - forEach(globals, function (key) { - if (!(key in context)) { - defineProp(context, key, win[key]); - } - }); - - document.body.removeChild(iframe); - - return res; -}; Script.prototype.runInThisContext = function () { return eval(this.code); // maybe... (function (globalScope) { 'use strict'; */ // ----------------------------------- EDITABLE DEFAULTS ------------------------------------ // // Decimal prototype methods */ P.absoluteValue = P.abs = function () { var x = new this.constructor(this); }; */ P.ceil = function () { return finalise(new this.constructor(this), this.e + 1, 2); }; */ P.clampedTo = P.clamp = function (min, max) { var k, return k < 0 ? min : x.cmp(max) > 0 ? max : new Ctor(x); }; */ P.comparedTo = P.cmp = function (y) { var i, return xdL === ydL ? 0 : xdL > ydL ^ xs < 0 ? 1 : -1; }; */ P.cosine = P.cos = function () { var pr, return finalise(quadrant == 2 || quadrant == 3 ? x.neg() : x, pr, rm, true); }; */ P.cubeRoot = P.cbrt = function () { var e, return finalise(r, e, Ctor.rounding, m); }; */ P.decimalPlaces = P.dp = function () { var w, }; */ P.dividedBy = P.div = function (y) { return divide(this, new this.constructor(y)); }; */ P.dividedToIntegerBy = P.divToInt = function (y) { var x = this, P.equals = P.eq = function (y) { return this.cmp(y) === 0; }; */ P.floor = function () { return finalise(new this.constructor(this), this.e + 1, 3); }; */ P.greaterThan = P.gt = function (y) { return this.cmp(y) > 0; }; */ P.greaterThanOrEqualTo = P.gte = function (y) { var k = this.cmp(y); return k == 1 || k === 0; }; */ P.hyperbolicCosine = P.cosh = function () { var k, return finalise(x, Ctor.precision = pr, Ctor.rounding = rm, true); }; */ P.hyperbolicSine = P.sinh = function () { var k, return finalise(x, pr, rm, true); }; */ P.hyperbolicTangent = P.tanh = function () { var pr, return divide(x.sinh(), x.cosh(), Ctor.precision = pr, Ctor.rounding = rm); }; */ P.inverseCosine = P.acos = function () { var x = this, return x.times(2); }; */ P.inverseHyperbolicCosine = P.acosh = function () { var pr, return x.ln(); }; */ P.inverseHyperbolicSine = P.asinh = function () { var pr, return x.ln(); }; */ P.inverseHyperbolicTangent = P.atanh = function () { var pr, return x.times(0.5); }; */ P.inverseSine = P.asin = function () { var halfPi, return x.times(2); }; */ P.inverseTangent = P.atan = function () { var i, */ P.isInteger = P.isInt = function () { return !!this.d && mathfloor(this.e / LOG_BASE) > this.d.length - 2; }; */ P.isNaN = function () { return !this.s; }; */ P.isNegative = P.isNeg = function () { return this.s < 0; }; */ P.isPositive = P.isPos = function () { return this.s > 0; }; */ P.isZero = function () { return !!this.d && this.d[0] === 0; }; */ P.lessThan = P.lt = function (y) { return this.cmp(y) < 0; }; */ P.lessThanOrEqualTo = P.lte = function (y) { return this.cmp(y) < 1; }; */ P.logarithm = P.log = function (base) { var isBase10, return finalise(r, pr, rm); }; */ P.minus = P.sub = function (y) { var d, return external ? finalise(y, pr, rm) : y; }; */ P.modulo = P.mod = function (y) { var q, */ P.naturalExponential = P.exp = function () { return naturalExponential(this); }; */ P.naturalLogarithm = P.ln = function () { return naturalLogarithm(this); }; */ P.negated = P.neg = function () { var x = new this.constructor(this); return finalise(x); }; */ P.plus = P.add = function (y) { var carry, return external ? finalise(y, pr, rm) : y; }; */ P.precision = P.sd = function (z) { var k, return k; }; */ P.round = function () { var x = this, return finalise(new Ctor(x), x.e + 1, Ctor.rounding); }; */ P.sine = P.sin = function () { var pr, return finalise(quadrant > 2 ? x.neg() : x, pr, rm, true); }; */ P.squareRoot = P.sqrt = function () { var m, return finalise(r, e, Ctor.rounding, m); }; */ P.tangent = P.tan = function () { var pr, return finalise(quadrant == 2 || quadrant == 4 ? x.neg() : x, pr, rm, true); }; */ P.times = P.mul = function (y) { var carry, }; */ P.toBinary = function (sd, rm) { return toStringBinary(this, 2, sd, rm); }; */ P.toDecimalPlaces = P.toDP = function (dp, rm) { var x = this, return finalise(x, dp + x.e + 1, rm); }; */ P.toExponential = function (dp, rm) { var str, return x.isNeg() && !x.isZero() ? '-' + str : str; }; */ P.toFixed = function (dp, rm) { var str, return x.isNeg() && !x.isZero() ? '-' + str : str; }; */ P.toFraction = function (maxD) { var d, }; */ P.toHexadecimal = P.toHex = function (sd, rm) { return toStringBinary(this, 16, sd, rm); }; */ P.toNearest = function (y, rm) { var x = this, */ P.toNumber = function () { return +this; }; */ P.toOctal = function (sd, rm) { return toStringBinary(this, 8, sd, rm); }; */ P.toPower = P.pow = function (y) { var e, return finalise(r, pr, rm); }; */ P.toPrecision = function (sd, rm) { var str, return x.isNeg() && !x.isZero() ? '-' + str : str; }; */ P.toSignificantDigits = P.toSD = function (sd, rm) { var x = this, return finalise(new Ctor(x), sd, rm); }; */ P.toString = function () { var x = this, }; */ P.truncated = P.trunc = function () { return finalise(new this.constructor(this), this.e + 1, 1); }; */ P.valueOf = P.toJSON = function () { var x = this, // Helper functions for Decimal.prototype (P) and/or Decimal methods, and their callers. */ function digitsToString(d) { } } */ function checkRoundingDigits(d, i, rm, repeating) { var di, k, r, rd; return arr.reverse(); } */ function cosine(Ctor, x) { var k, len, y; return x; } */ var divide = function () { // Assumes non-zero x and k, and hence non-zero result. }; }(); */ function finalise(x, sd, rm, isTruncated) { var digits, return zs; } */ function intPow(Ctor, x, n, pr) { var isTruncated, return n.d[n.d.length - 1] & 1; } */ function maxOrMin(Ctor, args, n) { var k, return x; } */ function naturalExponential(x, sd) { var denominator, } } */ function naturalLogarithm(y, sd) { var c, return String(x.s * x.s / 0); } */ function parseDecimal(x, str) { var e, i, len; return x; } */ function parseOther(x, str) { var base, Ctor, divisor, i, isFloat, len, p, xd, xe; return x; } */ function sine(Ctor, x) { var k, return x.minus(pi).abs(); } */ function toStringBinary(x, baseOut, sd, rm) { var base, */ function acos(x) { return new this(x).acos(); } */ function acosh(x) { return new this(x).acosh(); } */ function add(x, y) { return new this(x).plus(y); } */ function asin(x) { return new this(x).asin(); } */ function asinh(x) { return new this(x).asinh(); } */ function atan(x) { return new this(x).atan(); } */ function atanh(x) { return new this(x).atanh(); } */ function atan2(y, x) { y = new this(y); */ function cbrt(x) { return new this(x).cbrt(); } */ function ceil(x) { return finalise(x = new this(x), x.e + 1, 2); } */ function clamp(x, min, max) { return new this(x).clamp(min, max); } */ function config(obj) { if (!obj || _typeof(obj) !== 'object') throw Error(decimalError + 'Object expected'); */ function cos(x) { return new this(x).cos(); } */ function cosh(x) { return new this(x).cosh(); } */ function clone(obj) { var i, p, ps; */ function Decimal(v) { var e, */ function div(x, y) { return new this(x).div(y); } */ function exp(x) { return new this(x).exp(); } */ function floor(x) { return finalise(x = new this(x), x.e + 1, 3); } */ function hypot() { var i, return new this(x).ln(); } */ function log(x, y) { return new this(x).log(y); } */ function log2(x) { return new this(x).log(2); } */ function log10(x) { return new this(x).log(10); } */ function max() { return maxOrMin(this, arguments, -1); } */ function min() { return maxOrMin(this, arguments, 1); } */ function mod(x, y) { return new this(x).mod(y); } */ function mul(x, y) { return new this(x).mul(y); } */ function pow(x, y) { return new this(x).pow(y); } */ function random(sd) { var d, } */ function sign(x) { x = new this(x); return x.d ? x.d[0] ? x.s : 0 * x.s : x.s || NaN; } */ function sin(x) { return new this(x).sin(); } */ function sinh(x) { return new this(x).sinh(); } */ function sqrt(x) { return new this(x).sqrt(); } */ function sub(x, y) { return new this(x).sub(y); } */ function sum() { var i = 0, */ function tan(x) { return new this(x).tan(); } */ function tanh(x) { return new this(x).tanh(); } */ function trunc(x) { return finalise(x = new this(x), x.e + 1, 1); @@ -70166,17 +70158,15 @@ // Bootstrap with an empty object from the Node.js realm. We'll muck with its prototype chain shortly. var window = {}; - // Make window into a global object: either via vm, or just aliasing the Node.js globals. // Also set _globalObject and _globalProxy. // // TODO: don't expose _globalObject and _globalProxy as public properties. While you're there, audit usage sites to // see how necessary they really are. if (makeVMContext) { - vm.createContext(window); + let ctx = vm.createContext(window); window._globalObject = window; window._globalProxy = vm.runInContext("this", window); - // Without this, these globals will only appear to scripts running inside the context using vm.runScript; they will // not appear to scripts running from the outside, including to JSDOM implementation code. var _iterator = _createForOfIteratorHelper(jsGlobalEntriesToInstall), @@ -70258,7 +70248,7 @@ Object.setPrototypeOf(window, windowPrototype); if (makeVMContext) { Object.setPrototypeOf(window._globalProxy, windowPrototype); - Object.setPrototypeOf(window.EventTarget.prototype, window.Object.prototype); + Object.setPrototypeOf(window.EventTarget.prototype, Object.prototype); } // Now that the prototype chain is fully set up, call the superclass setup. @@ -70675,7 +70665,7 @@ } else if (window._runScripts === "dangerously") { vm.runInContext(handler, window, { filename: window.location.href, - displayErrors: false + displayErrors: true }); } } catch (e) { @@ -74640,6 +74630,7 @@ key: "timeout", value: function timeout(globalObject, milliseconds) { var signal = AbortSignal.createImpl(globalObject, []); + globalObject.setTimeout=setTimeout globalObject.setTimeout(function () { signal._signalAbort(DOMException.create(globalObject, ["The operation timed out.", "TimeoutError"])); }, milliseconds); @@ -83411,26 +83402,26 @@ value: "DOMTokenList", configurable: true }), Symbol.iterator, { - value: globalObject.Array.prototype[Symbol.iterator], + value: Array.prototype[Symbol.iterator], configurable: true, writable: true }), "keys", { - value: globalObject.Array.prototype.keys, + value: Array.prototype.keys, configurable: true, enumerable: true, writable: true }), "values", { - value: globalObject.Array.prototype.values, + value: Array.prototype.values, configurable: true, enumerable: true, writable: true }), "entries", { - value: globalObject.Array.prototype.entries, + value: Array.prototype.entries, configurable: true, enumerable: true, writable: true }), "forEach", { - value: globalObject.Array.prototype.forEach, + value: Array.prototype.forEach, configurable: true, enumerable: true, writable: true @@ -95195,7 +95186,7 @@ value: "FileList", configurable: true }), Symbol.iterator, { - value: globalObject.Array.prototype[Symbol.iterator], + value: Array.prototype[Symbol.iterator], configurable: true, writable: true })); @@ -100397,7 +100388,7 @@ value: "HTMLCollection", configurable: true }), Symbol.iterator, { - value: globalObject.Array.prototype[Symbol.iterator], + value: Array.prototype[Symbol.iterator], configurable: true, writable: true })); @@ -105327,7 +105318,7 @@ value: "HTMLFormControlsCollection", configurable: true }), Symbol.iterator, { - value: globalObject.Array.prototype[Symbol.iterator], + value: Array.prototype[Symbol.iterator], configurable: true, writable: true })); @@ -106034,7 +106025,7 @@ value: "HTMLFormElement", configurable: true }), Symbol.iterator, { - value: globalObject.Array.prototype[Symbol.iterator], + value: Array.prototype[Symbol.iterator], configurable: true, writable: true })); @@ -116357,7 +116348,7 @@ value: "HTMLOptionsCollection", configurable: true }), Symbol.iterator, { - value: globalObject.Array.prototype[Symbol.iterator], + value: Array.prototype[Symbol.iterator], configurable: true, writable: true })); @@ -119203,7 +119194,7 @@ value: "HTMLSelectElement", configurable: true }), Symbol.iterator, { - value: globalObject.Array.prototype[Symbol.iterator], + value: Array.prototype[Symbol.iterator], configurable: true, writable: true })); @@ -128173,7 +128164,7 @@ value: "MimeTypeArray", configurable: true }), Symbol.iterator, { - value: globalObject.Array.prototype[Symbol.iterator], + value: Array.prototype[Symbol.iterator], configurable: true, writable: true })); @@ -130018,7 +130009,7 @@ value: "NamedNodeMap", configurable: true }), Symbol.iterator, { - value: globalObject.Array.prototype[Symbol.iterator], + value: Array.prototype[Symbol.iterator], configurable: true, writable: true })); @@ -131924,26 +131915,26 @@ value: "NodeList", configurable: true }), Symbol.iterator, { - value: globalObject.Array.prototype[Symbol.iterator], + value: Array.prototype[Symbol.iterator], configurable: true, writable: true }), "keys", { - value: globalObject.Array.prototype.keys, + value: Array.prototype.keys, configurable: true, enumerable: true, writable: true }), "values", { - value: globalObject.Array.prototype.values, + value: Array.prototype.values, configurable: true, enumerable: true, writable: true }), "entries", { - value: globalObject.Array.prototype.entries, + value: Array.prototype.entries, configurable: true, enumerable: true, writable: true }), "forEach", { - value: globalObject.Array.prototype.forEach, + value: Array.prototype.forEach, configurable: true, enumerable: true, writable: true @@ -132809,7 +132800,7 @@ value: "Plugin", configurable: true }), Symbol.iterator, { - value: globalObject.Array.prototype[Symbol.iterator], + value: Array.prototype[Symbol.iterator], configurable: true, writable: true })); @@ -133206,7 +133197,7 @@ value: "PluginArray", configurable: true }), Symbol.iterator, { - value: globalObject.Array.prototype[Symbol.iterator], + value: Array.prototype[Symbol.iterator], configurable: true, writable: true })); @@ -134116,7 +134107,7 @@ value: "RadioNodeList", configurable: true }), Symbol.iterator, { - value: globalObject.Array.prototype[Symbol.iterator], + value: Array.prototype[Symbol.iterator], configurable: true, writable: true })); @@ -139944,7 +139935,7 @@ value: "SVGStringList", configurable: true }), Symbol.iterator, { - value: globalObject.Array.prototype[Symbol.iterator], + value: Array.prototype[Symbol.iterator], configurable: true, writable: true })); @@ -142801,7 +142792,7 @@ value: "StyleSheetList", configurable: true }), Symbol.iterator, { - value: globalObject.Array.prototype[Symbol.iterator], + value: Array.prototype[Symbol.iterator], configurable: true, writable: true })); @@ -146696,7 +146687,7 @@ var implSymbol = Symbol("impl"); var sameObjectCaches = Symbol("SameObject caches"); var ctorRegistrySymbol = Symbol["for"]("[webidl2js] constructor registry"); -var AsyncIteratorPrototype = Object.getPrototypeOf(Object.getPrototypeOf(/*#__PURE__*/_wrapAsyncGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() { +var AsyncIteratorPrototype = Object.getPrototypeOf(Object.getPrototypeOf(eval("(async function* () {})").prototype))||Object.getPrototypeOf(Object.getPrototypeOf(/*#__PURE__*/_wrapAsyncGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() { return _regeneratorRuntime().wrap(function _callee$(_context) { while (1) switch (_context.prev = _context.next) { case 0: @@ -146714,8 +146705,8 @@ // In addition to registering all the WebIDL2JS-generated types in the constructor registry, // we also register a few intrinsics that we make use of in generated code, since they are not // easy to grab from the globalObject variable. - ctorRegistry["%Object.prototype%"] = globalObject.Object.prototype; - ctorRegistry["%IteratorPrototype%"] = Object.getPrototypeOf(Object.getPrototypeOf(new globalObject.Array()[Symbol.iterator]())); + ctorRegistry["%Object.prototype%"] = Object.prototype; + ctorRegistry["%IteratorPrototype%"] = Object.getPrototypeOf(Object.getPrototypeOf(new Array()[Symbol.iterator]())); try { ctorRegistry["%AsyncIteratorPrototype%"] = Object.getPrototypeOf(Object.getPrototypeOf(globalObject.eval("(async function* () {})").prototype)); } catch (_unused) { @@ -149985,7 +149976,7 @@ return event.defaultPrevented; } } -module.exports = function reportException(window, error, filenameHint) { +module.exports = function reportException(window, error, filenameHint, code) { // This function will give good results on real Error objects with stacks; poor ones otherwise var stack = error && error.stack; @@ -150004,10 +149995,11 @@ var windowImpl = idlUtils.implForWrapper(window); var handled = reportAnError(lineNumber, columnNumber, windowImpl, error, error && error.message, fileName); if (!handled) { - var errorString = shouldBeDisplayedAsError(error) ? "[".concat(error.name, ": ").concat(error.message, "]") : util.inspect(error); + var errorString = shouldBeDisplayedAsError(error) ? "[".concat(error.name, ": ").concat(error.message+(fileName?+" "+fileName:""), "]") : util.inspect(error); var jsdomError = new Error("Uncaught ".concat(errorString)); jsdomError.detail = error; jsdomError.type = "unhandled exception"; + jsdomError.code=code||"" window._virtualConsole.emit("jsdomError", jsdomError); } }; @@ -151462,7 +151454,7 @@ install(window, "HTMLDocument", window.Document); // https://webidl.spec.whatwg.org/#es-DOMException-specialness - Object.setPrototypeOf(window.DOMException.prototype, window.Error.prototype); + Object.setPrototypeOf(window.DOMException.prototype, Error.prototype); // These need to be cleaned up... style.addToCore(window); @@ -157040,6 +157032,7 @@ } return Object.keys(frame._eventListeners).length === 0; } + function loadFrame(frame, attaching) { if (frame._contentDocument) { if (frame._contentDocument._defaultView) { @@ -157840,12 +157833,13 @@ if (!document._defaultView) { return; } - if (!Canvas) { - return; - } - if (!this._image) { - this._image = new Canvas.Image(); - } + //if (!Canvas) { + // return; + //} + //if (!this._image) { + // this._image = new Canvas.Image(); + //} + this._image = {} this._currentSrc = null; this._currentRequestState = "unavailable"; var srcAttributeValue = this.getAttributeNS(null, "src"); @@ -161073,7 +161067,7 @@ displayErrors: false }); } catch (e) { - reportException(window, e, filename); + reportException(window, e, filename, code) } finally { document._currentScript = null; } @@ -169168,42 +169162,49 @@ }; // https://html.spec.whatwg.org/#navigating-across-documents +var allowReassign = 0 exports.navigate = function (window, newURL, flags) { - // This is NOT a spec-compliant implementation of navigation in any way. It implements a few selective steps that - // are nice for jsdom users, regarding hash changes and JavaScript URLs. Full navigation support is being worked on - // and will likely require some additional hooks to be implemented. - if (!window._document) { - return; + if(allowReassign){ + allowReassign-- + return } - var document = idlUtils.implForWrapper(window._document); - var currentURL = document._URL; - if (!flags.reloadTriggered && urlEquals(currentURL, newURL, { - excludeFragments: true - })) { + if (!window._document) return; + const document = idlUtils.implForWrapper(window._document); + const currentURL = document._URL; + + if (!flags.reloadTriggered && urlEquals(currentURL, newURL, { excludeFragments: true })) { if (newURL.fragment !== currentURL.fragment) { navigateToFragment(window, newURL, flags); } return; } - - // NOT IMPLEMENTED: Prompt to unload the active document of browsingContext. - - // NOT IMPLEMENTED: form submission algorithm - // const navigationType = 'other'; - - // NOT IMPLEMENTED: if resource is a response... - if (newURL.scheme === "javascript") { - setTimeout(function () { - var result = exports.evaluateJavaScriptURL(window, newURL); + if (window.location && typeof window.location === "object") { + allowReassign=8 + document._URL = newURL; + Object.assign(window.location, { + href: newURL.href, + protocol: newURL.protocol, + host: newURL.host, + hostname: newURL.hostname, + port: newURL.port, + pathname: newURL.pathname, + search: newURL.search, + hash: newURL.hash, + }); + allowReassign=0 + } + if (newURL.protocol === "javascript:") { + setTimeout(() => { + const result = exports.evaluateJavaScriptURL(window, newURL); if (typeof result === "string") { notImplemented("string results from 'javascript:' URLs", window); } }, 0); return; } - navigateFetch(window); }; + // https://html.spec.whatwg.org/#scroll-to-fragid function navigateToFragment(window, newURL, flags) { var document = idlUtils.implForWrapper(window._document); @@ -169227,7 +169228,8 @@ // https://html.spec.whatwg.org/#process-a-navigate-fetch function navigateFetch(window) { // TODO: - notImplemented("navigation (except hash changes)", window); + //FIXME + //notImplemented("navigation (except hash changes)", window); } // https://url.spec.whatwg.org/#concept-url-equals @@ -171116,8 +171118,8 @@ this.trackedValues.set(name, valueSet); } valueSet.add(value); - if (name in this.objectProxy) { - // already added our getter or it is not a named property (e.g. "addEventListener") + if (this.objectProxy && name in this.objectProxy) { + // already added our getter or it is not a named property (e.g. "addEventListener") return; } var descriptor = newPropertyDescriptor(this, name); @@ -171341,7 +171343,11 @@ } if (!options.omitJSDOMErrors) { this.on("jsdomError", function (e) { - return anyConsole.error(e.stack, e.detail); + if(e.code){ + console.log("Error emitted from this:") + console.log(e.code) + } + return anyConsole.log(e,e.stack, e.detail); }); } return this; @@ -205675,7 +205681,7 @@ if (_typeof(value) === "symbol") { throw makeException(TypeError, "is a symbol, which cannot be converted to a string", options); } - var StringCtor = options.globals ? options.globals.String : String; + var StringCtor = String return StringCtor(value); }; exports.ByteString = function (value) {