puppeteer/utils
Andrey Lushnikov 6512ce768d
fix(Frame): postpone evaluations until execution context gets created (#1415)
In Blink, frames don't necesserily have execution context all the time.
DevTools Protocol precisely reports this situation, which results in
Puppeteer's frame.executionContext() being null occasionally.

However, from puppeteer point of view every frame will have at least a
default executions context, sooner or later:

- frame's execution context might be created naturally to run frame's
  javascript
- if frame has no javascript, devtools protocol will issue execution
  context creation

This patch builds up on this assumption and makes frame.executionContext()
to be a promise.
As a result, all the evaluations await for the execution context to be created first.

Fixes #827, #1325

BREAKING CHANGE: this patch changes frame.executionContext() method to return a promise.
To migrate onto a new behavior, await the context first before using it.
2017-11-18 16:27:52 -08:00
..
doclint fix(Frame): postpone evaluations until execution context gets created (#1415) 2017-11-18 16:27:52 -08:00
node6-transform Node6: Remove parentheses around the body of async arrow functions (#942) 2017-10-02 18:25:11 -07:00
check_availability.js Remove promise jsdoc (#641) 2017-08-31 17:58:07 -07:00
ChromiumDownloader.js feat(install): add environment variable to overwrite host part of url (#958) 2017-10-21 18:22:13 -07:00
ESTreeWalker.js Fix node6 support for Object.entries and URL object (#548) 2017-08-25 15:13:59 -07:00
fetch_devices.js Change let into const (#457) 2017-08-21 16:39:04 -07:00