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;