From ebc94c03b13ee49815fdaa8b96a0dbc9a3edf926 Mon Sep 17 00:00:00 2001 From: Pig Fang Date: Fri, 16 Mar 2018 17:38:34 +0800 Subject: [PATCH] Update "puppeteer" for v1.2.0 --- types/puppeteer/index.d.ts | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/types/puppeteer/index.d.ts b/types/puppeteer/index.d.ts index a549871070..2afb026648 100644 --- a/types/puppeteer/index.d.ts +++ b/types/puppeteer/index.d.ts @@ -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 // Christopher Deutsch @@ -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; + /** + * @returns Resolves to the content frame for element handles referencing iframe nodes, or null otherwise. + * @since 1.2.0 + */ + contentFrame(): Promise; /** * 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;