Merge pull request #31059 from AviVahl/puppeteer-default-viewport-null

puppeteer: allow disabling default viewport using null
This commit is contained in:
Andrew Casey 2018-12-05 11:00:36 -08:00 committed by GitHub
commit 8cb49af41f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View File

@ -2044,7 +2044,7 @@ export interface BrowserOptions {
* @default false
*/
isLandscape?: boolean;
};
} | null;
/**
* Slows down Puppeteer operations by the specified amount of milliseconds.
* Useful so that you can see what is going on.

View File

@ -202,6 +202,13 @@ puppeteer.launch().then(async browser => {
browser.close();
})();
// Launching with default viewport disabled
(async () => {
await puppeteer.launch({
defaultViewport: null
});
})();
// Test v0.12 features
(async () => {
const browser = await puppeteer.launch({