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

search for the title in the entire doc

Gildas 7 лет назад
Родитель
Сommit
156055b292
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      lib/single-file/single-file-core.js

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

@@ -229,7 +229,7 @@ const SingleFileCore = (() => {
 				DomProcessorHelper.isolateElement(selectedElement.parentElement, selectedElement);
 				selectedElement.removeAttribute(SELECTED_CONTENT_ATTRIBUTE_NAME);
 			}
-			const titleElement = this.doc.head.querySelector("title");
+			const titleElement = this.doc.querySelector("title");
 			let title;
 			if (titleElement) {
 				title = titleElement.textContent.trim();