6512ce768d
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. |
||
---|---|---|
.. | ||
check_public_api | ||
preprocessor | ||
.gitignore | ||
cli.js | ||
Message.js | ||
README.md | ||
SourceFactory.js | ||
toc.js |
DocLint
Doclint is a small program that lints Puppeteer's documentation against Puppeteer's source code.
Doclint works in a few steps:
- Read sources in
lib/
folder, parse AST trees and extract public API - Read sources in
docs/
folder, render markdown to HTML, use puppeteer to traverse the HTML and extract described API - Compare one API to another
Doclint is also responsible for general markdown checks, most notably for the table of contents relevancy.
Running
npm run doc
Tests
Doclint has its own set of jasmine tests, located at utils/doclint/test
folder.
To execute tests, run:
npm run test-doclint