ajax-hooker 1.3.1 → 1.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cjs/index.js CHANGED
@@ -31,7 +31,7 @@ Object.getOwnPropertyDescriptor.bind(Object);
31
31
 
32
32
  const getType = Object.prototype.toString.call.bind(Object.prototype.toString);
33
33
 
34
- const resolveUrl = (url = "") => new URL(url, window.location.href).toString();
34
+ const resolveUrl = (url = "") => new URL(url, document.baseURI).toString();
35
35
 
36
36
  const getProxyValue = (target, prop) => {
37
37
  const value = Reflect.get(target, prop);
package/dist/esm/index.js CHANGED
@@ -25,7 +25,7 @@ Object.getOwnPropertyDescriptor.bind(Object);
25
25
 
26
26
  const getType = Object.prototype.toString.call.bind(Object.prototype.toString);
27
27
 
28
- const resolveUrl = (url = "") => new URL(url, window.location.href).toString();
28
+ const resolveUrl = (url = "") => new URL(url, document.baseURI).toString();
29
29
 
30
30
  const getProxyValue = (target, prop) => {
31
31
  const value = Reflect.get(target, prop);
@@ -22,7 +22,7 @@ var AjaxHooker = function(exports) {
22
22
  }
23
23
  Object.getOwnPropertyDescriptor.bind(Object);
24
24
  const getType = Object.prototype.toString.call.bind(Object.prototype.toString);
25
- const resolveUrl = (url = "") => new URL(url, window.location.href).toString();
25
+ const resolveUrl = (url = "") => new URL(url, document.baseURI).toString();
26
26
  const getProxyValue = (target, prop) => {
27
27
  const value = Reflect.get(target, prop);
28
28
  if (typeof value !== "function") return value;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ajax-hooker",
3
- "version": "1.3.1",
3
+ "version": "1.3.2",
4
4
  "description": "Browser AJAX interceptor for XMLHttpRequest and fetch with unified hooks, request/response mutation, and streaming response support.",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",