elegance-js 2.1.32 → 2.1.33
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/client/runtime.js +3 -3
- package/package.json +1 -1
package/dist/client/runtime.js
CHANGED
|
@@ -412,8 +412,8 @@ const domParser = new DOMParser();
|
|
|
412
412
|
const xmlSerializer = new XMLSerializer();
|
|
413
413
|
const fetchPage = async (targetURL) => {
|
|
414
414
|
const pathname = sanitizePathname(targetURL.pathname);
|
|
415
|
-
if (pageStringCache.has(
|
|
416
|
-
return domParser.parseFromString(pageStringCache.get(
|
|
415
|
+
if (pageStringCache.has(targetURL.href)) {
|
|
416
|
+
return domParser.parseFromString(pageStringCache.get(targetURL.href), "text/html");
|
|
417
417
|
}
|
|
418
418
|
const res = await fetch(targetURL);
|
|
419
419
|
const newDOM = domParser.parseFromString(await res.text(), "text/html");
|
|
@@ -444,7 +444,7 @@ const fetchPage = async (targetURL) => {
|
|
|
444
444
|
newDOM.head.appendChild(script);
|
|
445
445
|
}
|
|
446
446
|
}
|
|
447
|
-
pageStringCache.set(
|
|
447
|
+
pageStringCache.set(targetURL.href, xmlSerializer.serializeToString(newDOM));
|
|
448
448
|
return newDOM;
|
|
449
449
|
};
|
|
450
450
|
let navigationCallbacks = [];
|