-
-
Notifications
You must be signed in to change notification settings - Fork 49
Open
Description
chobitsu/src/lib/nodeManager.ts
Lines 73 to 77 in 6156d2b
| export function getChildNodes(node: any, depth: number) { | |
| const childNodes = filterNodes(node.childNodes) | |
| return map(childNodes, node => wrap(node, { depth: depth - 1 })) | |
| } |
In mobile & electron
When node is iframe,i think the node.childNodes must be node.contentDocument.childNodes
export function getChildNodes(node: any, depth: number) {
let childNodes = filterNodes(node.childNodes)
if (
node.localName === 'iframe' &&
node?.contentDocument?.childNodes?.length > 0
) {
childNodes = filterNodes(node.contentDocument.childNodes)
}
return map(childNodes, node => wrap(node, { depth: depth - 1 }))
}// Electron need to turn off site-isolation
app.commandLine.appendSwitch('disable-site-isolation-trials')Metadata
Metadata
Assignees
Labels
No labels