|
|
@@ -58,7 +58,7 @@ this.singlefile.lib.core = this.singlefile.lib.core || (() => {
|
|
|
this.runner.cancel();
|
|
|
}
|
|
|
}
|
|
|
- async getPageData() {
|
|
|
+ getPageData() {
|
|
|
return this.runner.getPageData();
|
|
|
}
|
|
|
}
|
|
|
@@ -240,7 +240,7 @@ this.singlefile.lib.core = this.singlefile.lib.core || (() => {
|
|
|
return this.processor.stylesheets;
|
|
|
}
|
|
|
|
|
|
- async getPageData() {
|
|
|
+ getPageData() {
|
|
|
if (this.root) {
|
|
|
this.onprogress(new ProgressEvent(PAGE_ENDED, { pageURL: this.options.url }));
|
|
|
}
|
|
|
@@ -311,7 +311,7 @@ this.singlefile.lib.core = this.singlefile.lib.core || (() => {
|
|
|
this.duplicates = new Map();
|
|
|
}
|
|
|
|
|
|
- async addURL(resourceURL, asBinary, groupDuplicates) {
|
|
|
+ addURL(resourceURL, asBinary, groupDuplicates) {
|
|
|
return new Promise((resolve, reject) => {
|
|
|
const requestKey = JSON.stringify([resourceURL, asBinary]);
|
|
|
let resourceRequests = this.requests.get(requestKey);
|
|
|
@@ -336,7 +336,7 @@ this.singlefile.lib.core = this.singlefile.lib.core || (() => {
|
|
|
return this.requests.size;
|
|
|
}
|
|
|
|
|
|
- async run(onloadListener, options) {
|
|
|
+ run(onloadListener, options) {
|
|
|
const resourceURLs = [...this.requests.keys()];
|
|
|
let indexResource = 0;
|
|
|
return Promise.all(resourceURLs.map(async requestKey => {
|
|
|
@@ -1293,7 +1293,7 @@ this.singlefile.lib.core = this.singlefile.lib.core || (() => {
|
|
|
}
|
|
|
|
|
|
replaceStyleAttributes() {
|
|
|
- this.doc.querySelectorAll("[style]").forEach(async element => {
|
|
|
+ this.doc.querySelectorAll("[style]").forEach(element => {
|
|
|
const declarations = this.styles.get(element);
|
|
|
if (declarations) {
|
|
|
this.styles.delete(element);
|