Revert "feat(Page): teach Page.setContent to wait for resources to load (#1152)" (#1312)

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:
Andrey Lushnikov
2017-11-07 14:18:05 -08:00
committed by GitHub
parent b58d319926
commit cbe3dc58a2
3 changed files with 9 additions and 31 deletions

View File

@@ -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);
}
/**