feat: enable blocking in current page

This commit is contained in:
karishmas6
2024-07-20 06:02:50 +05:30
parent 0087252270
commit c58d816a59

View File

@@ -93,6 +93,7 @@ export class RemoteBrowser {
const context = await this.browser.newContext();
this.currentPage = await context.newPage();
const blocker = await PlaywrightBlocker.fromPrebuiltAdsAndTracking(fetch);
blocker.enableBlockingInPage(this.currentPage);
this.client = await this.currentPage.context().newCDPSession(this.currentPage);
};