瀏覽代碼

search for the title in the entire doc

Gildas 7 年之前
父節點
當前提交
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();