single-file-core 1.0.42 → 1.0.44
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/modules/css-fonts-alt-minifier.js +1 -0
- package/package.json +1 -1
- package/processors/frame-tree/content/content-frame-tree.js +1 -0
- package/processors/hooks/content/content-hooks-frames-web.js +2 -1
- package/processors/hooks/content/content-hooks-frames.js +1 -0
- package/single-file-core.js +1 -0
- package/single-file-helper.js +1 -0
package/package.json
CHANGED
|
@@ -63,6 +63,7 @@ const addEventListener = (type, listener, options) => globalThis.addEventListene
|
|
|
63
63
|
const top = globalThis.top;
|
|
64
64
|
const MessageChannel = globalThis.MessageChannel;
|
|
65
65
|
const document = globalThis.document;
|
|
66
|
+
const JSON = globalThis.JSON;
|
|
66
67
|
|
|
67
68
|
let sessions = globalThis.sessions;
|
|
68
69
|
if (!sessions) {
|
|
@@ -68,6 +68,7 @@
|
|
|
68
68
|
const FileReader = globalThis.FileReader;
|
|
69
69
|
const Blob = globalThis.Blob;
|
|
70
70
|
const console = globalThis.console;
|
|
71
|
+
const JSON = globalThis.JSON;
|
|
71
72
|
const warn = (console && console.warn && ((...args) => console.warn(...args))) || (() => { });
|
|
72
73
|
|
|
73
74
|
const observers = new Map();
|
|
@@ -322,7 +323,7 @@
|
|
|
322
323
|
getDetailObject(...arguments).then(detail => dispatchEvent(new CustomEvent(NEW_FONT_FACE_EVENT, { detail })));
|
|
323
324
|
return new FontFace(...arguments);
|
|
324
325
|
};
|
|
325
|
-
globalThis.FontFace.
|
|
326
|
+
globalThis.FontFace.prototype = FontFace.prototype;
|
|
326
327
|
const deleteFont = document.fonts.delete;
|
|
327
328
|
document.fonts.delete = function (fontFace) {
|
|
328
329
|
getDetailObject(fontFace.family).then(detail => dispatchEvent(new CustomEvent(DELETE_FONT_EVENT, { detail })));
|
|
@@ -46,6 +46,7 @@ const dispatchEvent = event => { try { globalThis.dispatchEvent(event); } catch
|
|
|
46
46
|
const CustomEvent = globalThis.CustomEvent;
|
|
47
47
|
const document = globalThis.document;
|
|
48
48
|
const Document = globalThis.Document;
|
|
49
|
+
const JSON = globalThis.JSON;
|
|
49
50
|
|
|
50
51
|
let fontFaces;
|
|
51
52
|
if (window._singleFile_fontFaces) {
|
package/single-file-core.js
CHANGED
package/single-file-helper.js
CHANGED
|
@@ -64,6 +64,7 @@ const SINGLE_FILE_UI_ELEMENT_CLASS = "single-file-ui-element";
|
|
|
64
64
|
const EMPTY_RESOURCE = "data:,";
|
|
65
65
|
const addEventListener = (type, listener, options) => globalThis.addEventListener(type, listener, options);
|
|
66
66
|
const dispatchEvent = event => { try { globalThis.dispatchEvent(event); } catch (error) { /* ignored */ } };
|
|
67
|
+
const JSON = globalThis.JSON;
|
|
67
68
|
|
|
68
69
|
export {
|
|
69
70
|
initUserScriptHandler,
|