mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
This reverts commit 80ee469429.
Lifecycle events are not ready yet to support the setContent scenario.
The prerequisite for this is
https://chromium-review.googlesource.com/c/chromium/src/+/747805 that
might not land soon due to technical concerns.
This commit is contained in:
16
lib/Page.js
16
lib/Page.js
@@ -438,17 +438,13 @@ class Page extends EventEmitter {
|
||||
|
||||
/**
|
||||
* @param {string} html
|
||||
* @param {!Object=} options
|
||||
*/
|
||||
async setContent(html, options) {
|
||||
await Promise.all([
|
||||
this.evaluate(html => {
|
||||
document.open();
|
||||
document.write(html);
|
||||
document.close();
|
||||
}, html),
|
||||
this.waitForNavigation(options),
|
||||
]);
|
||||
async setContent(html) {
|
||||
await this.evaluate(html => {
|
||||
document.open();
|
||||
document.write(html);
|
||||
document.close();
|
||||
}, html);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user