single-file-core 1.0.30 → 1.0.32
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.
|
@@ -84,7 +84,7 @@ function process(doc, stylesheets, styles, options) {
|
|
|
84
84
|
}));
|
|
85
85
|
fontsInfo.used = fontsInfo.used.map(fontNames => helper.flatten(fontNames));
|
|
86
86
|
}
|
|
87
|
-
const variableFound = fontsInfo.used.find(fontNames => fontNames.find(fontName => fontName.
|
|
87
|
+
const variableFound = fontsInfo.used.find(fontNames => fontNames.find(fontName => fontName.match(/^var\(--/)));
|
|
88
88
|
let unusedFonts, filteredUsedFonts;
|
|
89
89
|
if (variableFound) {
|
|
90
90
|
unusedFonts = [];
|
package/package.json
CHANGED
|
@@ -132,7 +132,10 @@
|
|
|
132
132
|
});
|
|
133
133
|
image.onload = image.onloadend = image.onerror = event => {
|
|
134
134
|
dispatchEvent(new CustomEvent(IMAGE_LOADED_EVENT, { detail: image.src }));
|
|
135
|
-
|
|
135
|
+
event.__defineGetter__("currentTarget", () => result);
|
|
136
|
+
event.__defineGetter__("target", () => result);
|
|
137
|
+
event.__defineGetter__("srcElement", () => result);
|
|
138
|
+
result.dispatchEvent(event);
|
|
136
139
|
};
|
|
137
140
|
if (image.decode) {
|
|
138
141
|
result.decode = () => image.decode();
|