Просмотр исходного кода

moved SingleFile declaration out of getClass

Gildas 7 лет назад
Родитель
Сommit
a143ee6998
2 измененных файлов с 4 добавлено и 3 удалено
  1. 2 1
      lib/single-file/single-file-browser.js
  2. 2 2
      node-jsdom/single-file-jsdom.js

+ 2 - 1
lib/single-file/single-file-browser.js

@@ -62,9 +62,10 @@ this.SingleFileBrowser = this.SingleFileBrowser || (() => {
 		parseURL
 	};
 	const DocUtil = DocUtilCore.getClass(modules, domUtil);
+	const SingleFile = SingleFileCore.getClass(DocUtil, cssTree);
 	let fetchResource;
 	return {
-		getClass: () => SingleFileCore.getClass(DocUtil, cssTree)
+		getClass: () => SingleFile
 	};
 
 	async function getResourceContent(resourceURL) {

+ 2 - 2
node-jsdom/single-file-jsdom.js

@@ -76,8 +76,8 @@ const domUtil = {
 	parseURL
 };
 const DocUtil = this.DocUtilCore.getClass(modules, domUtil);
-
-exports.getClass = () => this.SingleFileCore.getClass(DocUtil, this.cssTree);
+const SingleFile = this.SingleFileCore.getClass(DocUtil, this.cssTree);
+exports.getClass = () => SingleFile;
 exports.getPageData = async options => {
 	const pageContent = (await request({
 		method: "GET",