We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 82a3c62 commit 2bfa15aCopy full SHA for 2bfa15a
sources/academy/webscraping/puppeteer_playwright/executing_scripts/injecting_code.md
@@ -35,7 +35,7 @@ const page = await browser.newPage();
35
36
await page.addInitScript(() => {
37
// Override the prototype
38
- Node.prototype.addEventListener = () => { /* do nothing */ };
+ Node.prototype.addEventListener = null; /* do nothing */
39
});
40
41
await page.goto('https://google.com');
@@ -55,7 +55,7 @@ const page = await browser.newPage();
55
56
await page.evaluateOnNewDocument(() => {
57
58
- Node.prototype.addEventListener = null;
59
60
61
0 commit comments