Merge pull request #24328 from g-plane/master

Update "puppeteer" for v1.2.0
This commit is contained in:
Arthur Ozga 2018-03-16 13:31:06 -07:00 committed by GitHub
commit b7c5348e46
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,4 +1,4 @@
// Type definitions for puppeteer 1.1
// Type definitions for puppeteer 1.2
// Project: https://github.com/GoogleChrome/puppeteer#readme
// Definitions by: Marvin Hagemeister <https://github.com/marvinhagemeister>
// Christopher Deutsch <https://github.com/cdeutsch>
@ -410,6 +410,8 @@ export interface ScriptTagOptions {
path?: string;
/** Raw JavaScript content to be injected into frame. */
content?: string;
/** Script type. Use 'module' in order to load a Javascript ES6 module. */
type?: string;
}
export interface PageFnOptions {
@ -459,6 +461,11 @@ export interface ElementHandle extends JSHandle {
* @since 0.9.0
*/
click(options?: ClickOptions): Promise<void>;
/**
* @returns Resolves to the content frame for element handles referencing iframe nodes, or null otherwise.
* @since 1.2.0
*/
contentFrame(): Promise<Frame | null>;
/**
* Calls focus on the element.
*/
@ -637,6 +644,18 @@ export interface Request {
/** Contains the request's post body, if any. */
postData(): string | undefined;
/**
* A `redirectChain` is a chain of requests initiated to fetch a resource.
*
* - If there are no redirects and the request was successful, the chain will be empty.
* - If a server responds with at least a single redirect, then the chain will contain all the requests that were redirected.
*
* `redirectChain` is shared between all the requests of the same chain.
*
* @since 1.2.0
*/
redirectChain(): Request[];
/** Contains the request's resource type as it was perceived by the rendering engine. */
resourceType(): ResourceType;