@whitesev/utils 2.3.2 → 2.3.3

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/index.umd.js CHANGED
@@ -1759,6 +1759,8 @@
1759
1759
  data: details.data || this.context.#defaultDetails.data,
1760
1760
  redirect: details.redirect || this.context.#defaultDetails.redirect,
1761
1761
  cookie: details.cookie || this.context.#defaultDetails.cookie,
1762
+ cookiePartition: details.cookiePartition ||
1763
+ this.context.#defaultDetails.cookiePartition,
1762
1764
  binary: details.binary || this.context.#defaultDetails.binary,
1763
1765
  nocache: details.nocache || this.context.#defaultDetails.nocache,
1764
1766
  revalidate: details.revalidate || this.context.#defaultDetails.revalidate,
@@ -1860,6 +1862,15 @@
1860
1862
  else {
1861
1863
  result.fetchInit = details.fetchInit;
1862
1864
  }
1865
+ // 处理新的cookiePartition
1866
+ if (typeof result.cookiePartition === "object" &&
1867
+ result.cookiePartition != null) {
1868
+ if (Reflect.has(result.cookiePartition, "topLevelSite") &&
1869
+ typeof result.cookiePartition.topLevelSite !== "string") {
1870
+ // topLevelSite必须是字符串
1871
+ Reflect.deleteProperty(result.cookiePartition, "topLevelSite");
1872
+ }
1873
+ }
1863
1874
  return result;
1864
1875
  },
1865
1876
  /**
@@ -2349,6 +2360,7 @@
2349
2360
  data: void 0,
2350
2361
  redirect: void 0,
2351
2362
  cookie: void 0,
2363
+ cookiePartition: void 0,
2352
2364
  binary: void 0,
2353
2365
  nocache: void 0,
2354
2366
  revalidate: void 0,
@@ -3932,7 +3944,7 @@
3932
3944
  this.windowApi = new WindowApi(option);
3933
3945
  }
3934
3946
  /** 版本号 */
3935
- version = "2024.9.10";
3947
+ version = "2024.9.28";
3936
3948
  addStyle(cssText) {
3937
3949
  if (typeof cssText !== "string") {
3938
3950
  throw new Error("Utils.addStyle 参数cssText 必须为String类型");