For situations like https://github.com/pixiebrix/pixiebrix-source/pull/1438
It would replace:
const offscreenPage = { page: "offscreen" };
export const clearRecordings = wrapEnsureOffscreenDocumentInBackground(
getMethod("CLEAR_RECORDINGS", offscreenPage),
);
with
const offscreenPage = { page: "offscreen", retryCallback: ensureOffscreenDocument };
export const clearRecordings = getMethod("CLEAR_RECORDINGS", offscreenPage);
which will call ensureOffscreenDocument after the first failure. The callback will be called with the error received so it can determine whether it's related to a missing offscreen (however it the internal retry logic I think only fails in case of broken communication)
For situations like https://github.com/pixiebrix/pixiebrix-source/pull/1438
It would replace:
with
which will call
ensureOffscreenDocumentafter the first failure. The callback will be called with the error received so it can determine whether it's related to a missing offscreen (however it the internal retry logic I think only fails in case of broken communication)