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.startsWith("var(--")));
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "single-file-core",
3
- "version": "1.0.30",
3
+ "version": "1.0.32",
4
4
  "description": "SingleFile Core",
5
5
  "author": "Gildas Lormeau",
6
6
  "license": "AGPL-3.0-or-later",
@@ -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
- result.dispatchEvent(new UIEvent(event.type, event));
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();