From 00196e6cdc2f2f364903cf2cb020106576ed5098 Mon Sep 17 00:00:00 2001 From: Andrey Lushnikov Date: Fri, 4 Aug 2017 00:23:04 -0700 Subject: [PATCH] Fix setContent to actually await the inner evaluation (#209) --- lib/Page.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Page.js b/lib/Page.js index 3a2dc609..6b9617e8 100644 --- a/lib/Page.js +++ b/lib/Page.js @@ -252,7 +252,7 @@ class Page extends EventEmitter { * @return {!Promise} */ async setContent(html) { - this.evaluate(html => { + await this.evaluate(html => { document.open(); document.write(html); document.close();