mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
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,
|
||||
contextIds: string[],
|
||||
ignoreHTTPSErrors: boolean,
|
||||
defaultViewport?: Viewport,
|
||||
defaultViewport?: Viewport | null,
|
||||
process?: ChildProcess,
|
||||
closeCallback?: BrowserCloseCallback
|
||||
): Promise<Browser> {
|
||||
@ -200,7 +200,7 @@ export class Browser extends EventEmitter {
|
||||
return browser;
|
||||
}
|
||||
private _ignoreHTTPSErrors: boolean;
|
||||
private _defaultViewport?: Viewport;
|
||||
private _defaultViewport?: Viewport | null;
|
||||
private _process?: ChildProcess;
|
||||
private _connection: Connection;
|
||||
private _closeCallback: BrowserCloseCallback;
|
||||
@ -219,7 +219,7 @@ export class Browser extends EventEmitter {
|
||||
connection: Connection,
|
||||
contextIds: string[],
|
||||
ignoreHTTPSErrors: boolean,
|
||||
defaultViewport?: Viewport,
|
||||
defaultViewport?: Viewport | null,
|
||||
process?: ChildProcess,
|
||||
closeCallback?: BrowserCloseCallback
|
||||
) {
|
||||
|
@ -37,7 +37,7 @@ export interface BrowserConnectOptions {
|
||||
/**
|
||||
* Sets the viewport for each page.
|
||||
*/
|
||||
defaultViewport?: Viewport;
|
||||
defaultViewport?: Viewport | null;
|
||||
/**
|
||||
* Slows down Puppeteer operations by the specified amount of milliseconds to
|
||||
* aid debugging.
|
||||
|
Loading…
Reference in New Issue
Block a user