diff --git a/assets/resources/scriptlets.js b/assets/resources/scriptlets.js index 900f94239..1218d0dd7 100644 --- a/assets/resources/scriptlets.js +++ b/assets/resources/scriptlets.js @@ -1345,11 +1345,11 @@ function preventXhrFn( 'content-type': '', 'content-length': '', }, + url: haystack.url, props: { response: { value: '' }, responseText: { value: '' }, responseXML: { value: null }, - responseURL: { value: haystack.url }, }, }); xhrInstances.set(this, xhrDetails); @@ -1405,6 +1405,7 @@ function preventXhrFn( xhrDetails.headers['content-length'] = `${xhrDetails.props.response.value}`.length; Object.defineProperties(xhrDetails.xhr, { readyState: { value: 4 }, + responseURL: { value: xhrDetails.url }, status: { value: 200 }, statusText: { value: 'OK' }, }); @@ -1414,6 +1415,7 @@ function preventXhrFn( Promise.resolve(xhrText).then(( ) => xhrDetails).then(details => { Object.defineProperties(details.xhr, { readyState: { value: 1, configurable: true }, + responseURL: { value: xhrDetails.url }, }); safeDispatchEvent(details.xhr, 'readystatechange'); return details;