Handle errors when observing iframes (#1058)

This commit is contained in:
Francesco Novy
2026-04-01 12:00:00 +08:00
committed by GitHub
parent 344fb81beb
commit 337e35a77f

View File

@@ -565,7 +565,12 @@ function record<T = eventWithTime>(
}; };
iframeManager.addLoadListener((iframeEl) => { iframeManager.addLoadListener((iframeEl) => {
try {
handlers.push(observe(iframeEl.contentDocument!)); handlers.push(observe(iframeEl.contentDocument!));
} catch (error) {
// TODO: handle internal error
console.warn(error);
}
}); });
const init = () => { const init = () => {