add cross origin support

This commit is contained in:
Андрей Бабушкин 2025-04-17 16:16:18 +02:00
parent 7d09e44023
commit 07848c7fa5
2 changed files with 1 additions and 1 deletions

View file

@ -277,6 +277,7 @@ export default class App {
private emptyBatchCounter = 0 private emptyBatchCounter = 0
private readonly vTree = new vElTree((id: number) => { private readonly vTree = new vElTree((id: number) => {
this.nodes.unregisterNodeById(id) this.nodes.unregisterNodeById(id)
this.iframes.delete(id)
this.send(RemoveNode(id)) this.send(RemoveNode(id))
}) })
private readonly iframes: Map<number, HTMLIFrameElement> = new Map(); private readonly iframes: Map<number, HTMLIFrameElement> = new Map();

View file

@ -62,7 +62,6 @@ export default class TopObserver extends Observer {
const [iframeId, iframeElement] = iframe const [iframeId, iframeElement] = iframe
if (iframeElement?.contentDocument === node) { if (iframeElement?.contentDocument === node) {
this.vTree.addNode(nodeId, iframeId) this.vTree.addNode(nodeId, iframeId)
this.iframes.delete(iframeId)
} }
} }
} }