style(tracker): review code fixes
This commit is contained in:
parent
d320aebc2d
commit
fd24470c1f
2 changed files with 7 additions and 10 deletions
|
|
@ -291,15 +291,12 @@ export default class DOMManager extends ListWalker<Message> {
|
|||
if (host instanceof HTMLIFrameElement) {
|
||||
const vDoc = new VDocument()
|
||||
this.vRoots.set(msg.id, vDoc)
|
||||
//host.onload = () => {
|
||||
const doc = host.contentDocument
|
||||
if (!doc) {
|
||||
logger.warn("No iframe doc onload", msg, host)
|
||||
return
|
||||
}
|
||||
vDoc.setDocument(doc)
|
||||
//vDoc.applyChanges()
|
||||
//}
|
||||
const doc = host.contentDocument
|
||||
if (!doc) {
|
||||
logger.warn("No iframe doc onload", msg, host)
|
||||
return
|
||||
}
|
||||
vDoc.setDocument(doc)
|
||||
return;
|
||||
} else if (host instanceof Element) { // shadow DOM
|
||||
try {
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ function hasAdoptedSS(node: Node): node is StyleSheetOwner {
|
|||
return (
|
||||
isRootNode(node) &&
|
||||
// @ts-ignore
|
||||
typeof node.adoptedStyleSheets !== 'undefined'
|
||||
!!node.adoptedStyleSheets
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue