Explorar o código

search for the title in the entire doc

Gildas %!s(int64=7) %!d(string=hai) anos
pai
achega
156055b292
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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);
 				DomProcessorHelper.isolateElement(selectedElement.parentElement, selectedElement);
 				selectedElement.removeAttribute(SELECTED_CONTENT_ATTRIBUTE_NAME);
 				selectedElement.removeAttribute(SELECTED_CONTENT_ATTRIBUTE_NAME);
 			}
 			}
-			const titleElement = this.doc.head.querySelector("title");
+			const titleElement = this.doc.querySelector("title");
 			let title;
 			let title;
 			if (titleElement) {
 			if (titleElement) {
 				title = titleElement.textContent.trim();
 				title = titleElement.textContent.trim();