Browse Source

removed obsolete code

Gildas 7 năm trước cách đây
mục cha
commit
5dad70c75f
1 tập tin đã thay đổi với 1 bổ sung2 xóa
  1. 1 2
      lib/single-file/single-file-core.js

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

@@ -709,9 +709,8 @@ this.SingleFileCore = this.SingleFileCore || (() => {
 		insertShadowRootContents() {
 			if (this.options.shadowRootContents) {
 				this.doc.querySelectorAll("[" + DocUtil.shadowRootAttributeName(this.options.sessionId) + "]").forEach((element, elementIndex) => {
-					const DOMParser = DocUtil.getParser();
 					const elementInfo = this.options.shadowRootContents[elementIndex];
-					if (DOMParser && elementInfo) {
+					if (elementInfo) {
 						const frameElement = this.doc.createElement("iframe");
 						frameElement.setAttribute("style", "all:initial!important;border:0!important;width:100%!important;height:" + elementInfo.height + "px!important");
 						const windowId = "shadow-" + this.options.framesData.length;