Handle errors when observing iframes (#1058)

This commit is contained in:
Francesco Novy
2023-01-09 04:44:33 +01:00
committed by GitHub
parent 36b44e104b
commit 44e92cbff9

View File

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