fix(typescript): allow defaultViewport to be 'null' (#6942)
Fixes: #6885 Co-authored-by: Maksim Sadym <69349599+sadym-chromium@users.noreply.github.com>
This commit is contained in:
parent
c62b02f177
commit
e31e68dfa1
@ -184,7 +184,7 @@ export class Browser extends EventEmitter {
|
|||||||
connection: Connection,
|
connection: Connection,
|
||||||
contextIds: string[],
|
contextIds: string[],
|
||||||
ignoreHTTPSErrors: boolean,
|
ignoreHTTPSErrors: boolean,
|
||||||
defaultViewport?: Viewport,
|
defaultViewport?: Viewport | null,
|
||||||
process?: ChildProcess,
|
process?: ChildProcess,
|
||||||
closeCallback?: BrowserCloseCallback
|
closeCallback?: BrowserCloseCallback
|
||||||
): Promise<Browser> {
|
): Promise<Browser> {
|
||||||
@ -200,7 +200,7 @@ export class Browser extends EventEmitter {
|
|||||||
return browser;
|
return browser;
|
||||||
}
|
}
|
||||||
private _ignoreHTTPSErrors: boolean;
|
private _ignoreHTTPSErrors: boolean;
|
||||||
private _defaultViewport?: Viewport;
|
private _defaultViewport?: Viewport | null;
|
||||||
private _process?: ChildProcess;
|
private _process?: ChildProcess;
|
||||||
private _connection: Connection;
|
private _connection: Connection;
|
||||||
private _closeCallback: BrowserCloseCallback;
|
private _closeCallback: BrowserCloseCallback;
|
||||||
@ -219,7 +219,7 @@ export class Browser extends EventEmitter {
|
|||||||
connection: Connection,
|
connection: Connection,
|
||||||
contextIds: string[],
|
contextIds: string[],
|
||||||
ignoreHTTPSErrors: boolean,
|
ignoreHTTPSErrors: boolean,
|
||||||
defaultViewport?: Viewport,
|
defaultViewport?: Viewport | null,
|
||||||
process?: ChildProcess,
|
process?: ChildProcess,
|
||||||
closeCallback?: BrowserCloseCallback
|
closeCallback?: BrowserCloseCallback
|
||||||
) {
|
) {
|
||||||
|
@ -37,7 +37,7 @@ export interface BrowserConnectOptions {
|
|||||||
/**
|
/**
|
||||||
* Sets the viewport for each page.
|
* Sets the viewport for each page.
|
||||||
*/
|
*/
|
||||||
defaultViewport?: Viewport;
|
defaultViewport?: Viewport | null;
|
||||||
/**
|
/**
|
||||||
* Slows down Puppeteer operations by the specified amount of milliseconds to
|
* Slows down Puppeteer operations by the specified amount of milliseconds to
|
||||||
* aid debugging.
|
* aid debugging.
|
||||||
|
Loading…
Reference in New Issue
Block a user