Skip to content

Commit d07da09

Browse files
authored
Update method to pass HTML in Puppeteer provider (#25)
The previous method used to pass HTML to the browser in the example Puppeteer provider truncates output if certain characters are present in the HTML, including `#` which is present in HTML entities. `page.setContent` has been able to accept a `waitUntil` option for the last couple of years so this is now an available approach.
1 parent 983f3d2 commit d07da09

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

Resources/docs/provider/puppeteer.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,7 @@ const format = args[2];
2222
});
2323
const page = await browser.newPage();
2424

25-
// https://github.com/GoogleChrome/puppeteer/issues/728
26-
// await page.setContent(html);
27-
// await page.waitForNavigation({ waitUntil: 'networkidle0' });
28-
29-
await page.goto('data:text/html,' + html, { waitUntil: 'networkidle0' });
25+
await page.setContent(html, { waitUntil: 'networkidle0' });
3026

3127
let buff = null;
3228

0 commit comments

Comments
 (0)