Przeglądaj źródła

search for the title in the entire doc

Gildas 7 lat temu
rodzic
commit
156055b292
1 zmienionych plików z 1 dodań i 1 usunięć
  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();