1
0
Эх сурвалжийг харах

resolveStyleAttributeURLs is not async

Gildas 7 жил өмнө
parent
commit
abcac22610

+ 4 - 4
lib/single-file/single-file-core.js

@@ -89,12 +89,12 @@ this.SingleFileCore = this.SingleFileCore || (() => {
 			{ action: "resolveHrefs" },
 			{ action: "replaceCanvasElements" },
 			{ action: "insertFonts" },
-			{ option: "removeHiddenElements", action: "removeHiddenElements" }
+			{ option: "removeHiddenElements", action: "removeHiddenElements" },
+			{ action: "resolveStyleAttributeURLs" }
 		],
 		parallel: [
 			{ action: "resolveStylesheetURLs" },
 			{ action: "resolveLinkedStylesheetURLs" },
-			{ action: "resolveStyleAttributeURLs" },
 			{ option: "!removeFrames", action: "resolveFrameURLs" },
 			{ option: "!removeImports", action: "resolveHtmlImportURLs" }
 		]
@@ -832,8 +832,8 @@ this.SingleFileCore = this.SingleFileCore || (() => {
 			}));
 		}
 
-		async resolveStyleAttributeURLs() {
-			await Promise.all(Array.from(this.doc.querySelectorAll("[style]")).map(async element => element.setAttribute("style", DomProcessorHelper.resolveStylesheetURLs(element.getAttribute("style"), this.baseURI))));
+		resolveStyleAttributeURLs() {
+			Array.from(this.doc.querySelectorAll("[style]")).map(element => element.setAttribute("style", DomProcessorHelper.resolveStylesheetURLs(element.getAttribute("style"), this.baseURI)));
 		}
 
 		async processStyleAttributes() {