|
|
@@ -59,6 +59,7 @@ this.singlefile.lib.helper = this.singlefile.lib.helper || (() => {
|
|
|
};
|
|
|
const COMMENT_HEADER = "Page saved with SingleFile";
|
|
|
const COMMENT_HEADER_LEGACY = "Archive processed by SingleFile";
|
|
|
+ const SINGLE_FILE_UI_ELEMENT_CLASS = "single-file-ui-element";
|
|
|
const addEventListener = (type, listener, options) => window.addEventListener(type, listener, options);
|
|
|
const dispatchEvent = event => window.dispatchEvent(event);
|
|
|
|
|
|
@@ -98,7 +99,8 @@ this.singlefile.lib.helper = this.singlefile.lib.helper || (() => {
|
|
|
SELECTED_CONTENT_ATTRIBUTE_NAME,
|
|
|
ASYNC_SCRIPT_ATTRIBUTE_NAME,
|
|
|
COMMENT_HEADER,
|
|
|
- COMMENT_HEADER_LEGACY
|
|
|
+ COMMENT_HEADER_LEGACY,
|
|
|
+ SINGLE_FILE_UI_ELEMENT_CLASS
|
|
|
};
|
|
|
|
|
|
function initDoc(doc) {
|
|
|
@@ -186,7 +188,7 @@ this.singlefile.lib.helper = this.singlefile.lib.helper || (() => {
|
|
|
}
|
|
|
getResourcesInfo(win, doc, element, options, data, elementHidden, computedStyle);
|
|
|
const shadowRoot = getShadowRoot(element);
|
|
|
- if (shadowRoot) {
|
|
|
+ if (shadowRoot && !element.classList.contains(SINGLE_FILE_UI_ELEMENT_CLASS)) {
|
|
|
const shadowRootInfo = {};
|
|
|
element.setAttribute(SHADOW_ROOT_ATTRIBUTE_NAME, data.shadowRoots.length);
|
|
|
data.markedElements.push(element);
|