single-file-core 1.4.7 → 1.5.0
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/package.json
CHANGED
|
@@ -40,8 +40,9 @@
|
|
|
40
40
|
const LAZY_LOAD_ATTRIBUTE = "single-file-lazy-load";
|
|
41
41
|
const LOAD_IMAGE_EVENT = "single-file-load-image";
|
|
42
42
|
const IMAGE_LOADED_EVENT = "single-file-image-loaded";
|
|
43
|
+
const FETCH_SUPPORTED_REQUEST_EVENT = "single-file-request-fetch-supported";
|
|
44
|
+
const FETCH_SUPPORTED_RESPONSE_EVENT = "single-file-response-fetch-supported";
|
|
43
45
|
const FETCH_REQUEST_EVENT = "single-file-request-fetch";
|
|
44
|
-
const FETCH_ACK_EVENT = "single-file-ack-fetch";
|
|
45
46
|
const FETCH_RESPONSE_EVENT = "single-file-response-fetch";
|
|
46
47
|
const GET_ADOPTED_STYLESHEETS_REQUEST_EVENT = "single-file-request-get-adopted-stylesheets";
|
|
47
48
|
const UNREGISTER_GET_ADOPTED_STYLESHEETS_REQUEST_EVENT = "single-file-unregister-request-get-adopted-stylesheets";
|
|
@@ -132,8 +133,9 @@
|
|
|
132
133
|
delete globalThis._singleFile_indexedDB;
|
|
133
134
|
}
|
|
134
135
|
});
|
|
136
|
+
document.addEventListener(FETCH_SUPPORTED_REQUEST_EVENT, () =>
|
|
137
|
+
document.dispatchEvent(new CustomEvent(FETCH_SUPPORTED_RESPONSE_EVENT)));
|
|
135
138
|
document.addEventListener(FETCH_REQUEST_EVENT, async event => {
|
|
136
|
-
document.dispatchEvent(new CustomEvent(FETCH_ACK_EVENT));
|
|
137
139
|
const { url, options } = JSON.parse(event.detail);
|
|
138
140
|
let detail;
|
|
139
141
|
try {
|