mirror of
https://git.mirrors.martin98.com/https://github.com/jina-ai/reader
synced 2025-08-15 02:15:56 +08:00
fix: remove exposed function before cleanup
This commit is contained in:
parent
bfc6d678d8
commit
059c8aa61e
@ -82,6 +82,7 @@ export class PuppeteerControl extends AsyncService {
|
||||
return page;
|
||||
},
|
||||
destroy: async (page) => {
|
||||
await page.removeExposedFunction('reportSnapshot');
|
||||
await page.browserContext().close();
|
||||
},
|
||||
validate: async (page) => {
|
||||
@ -198,6 +199,9 @@ function giveSnapshot() {
|
||||
await page.evaluateOnNewDocument(`
|
||||
let aftershot = undefined;
|
||||
const handlePageLoad = () => {
|
||||
if (window.haltSnapshot) {
|
||||
return;
|
||||
}
|
||||
if (document.readyState !== 'complete') {
|
||||
return;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user