Fix setContent to actually await the inner evaluation (#209)
This commit is contained in:
parent
af2b790227
commit
00196e6cdc
@ -252,7 +252,7 @@ class Page extends EventEmitter {
|
|||||||
* @return {!Promise}
|
* @return {!Promise}
|
||||||
*/
|
*/
|
||||||
async setContent(html) {
|
async setContent(html) {
|
||||||
this.evaluate(html => {
|
await this.evaluate(html => {
|
||||||
document.open();
|
document.open();
|
||||||
document.write(html);
|
document.write(html);
|
||||||
document.close();
|
document.close();
|
||||||
|
Loading…
Reference in New Issue
Block a user