You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This code causes an exception. JSDOM is trying to load image with null url.
image loaded, will try to remove src attribute
=====
Error: Uncaught [TypeError: Cannot read property 'replace' of null]
at reportException (node_modules/jsdom/lib/jsdom/living/helpers/runtime-script-errors.js:63:24)
at invokeEventListeners (node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:233:9)
at HTMLImageElementImpl._dispatch (node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:122:9)
at HTMLImageElementImpl.dispatchEvent (node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:83:17)
at HTMLImageElementImpl.dispatchEvent (node_modules/jsdom/lib/jsdom/living/nodes/HTMLElement-impl.js:40:27)
at node_modules/jsdom/lib/jsdom/browser/resource-loader.js:51:15
at Object.check (node_modules/jsdom/lib/jsdom/living/nodes/Document-impl.js:91:11)
at node_modules/jsdom/lib/jsdom/living/nodes/Document-impl.js:110:12
at wrappedEnqueued (node_modules/jsdom/lib/jsdom/browser/resource-loader.js:255:16)
at readDataUrl (node_modules/jsdom/lib/jsdom/browser/resource-loader.js:114:7)
TypeError: Cannot read property 'replace' of null
at fetch (node_modules/jsdom/lib/jsdom/browser/resource-loader.js:139:6)
at Object.exports.load (node_modules/jsdom/lib/jsdom/browser/resource-loader.js:270:11)
at HTMLImageElementImpl._attrModified (jsdom/lib/jsdom/living/nodes/HTMLImageElement-impl.js:23:24)
at Object.exports.removeAttribute (node_modules/jsdom/lib/jsdom/living/attributes.js:242:15)
at Object.exports.removeAttributeByName (node_modules/jsdom/lib/jsdom/living/attributes.js:392:13)
at HTMLImageElementImpl.removeAttribute (node_modules/jsdom/lib/jsdom/living/nodes/Element-impl.js:257:16)
at HTMLImageElement.removeAttribute (node_modules/jsdom/lib/jsdom/living/generated/Element.js:163:21)
at HTMLImageElement.onLoad (test-jsdom-image.js:15:11)
at invokeEventListeners (node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:217:27)
at HTMLImageElementImpl._dispatch (node_modules/jsdom/lib/jsdom/living/events/EventTarget-impl.js:122:9)
Basic info:
Minimal reproduction case
This code causes an exception. JSDOM is trying to load image with null url.
How does similar code behave in browsers?
There are no remote requests for null resource. Also no exceptions are thrown.
http://jsbin.com/dehiweqape/edit?html,output
The text was updated successfully, but these errors were encountered: