docs: fix broken link to DeviceDescriptors.ts (#6076)

This commit is contained in:
Stefan 2020-06-23 06:56:31 +02:00 committed by GitHub
parent 6657364364
commit 2090676a55
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -498,7 +498,7 @@ The default flags that Chromium will be launched with.
- returns: <[Object]>
Returns a list of devices to be used with [`page.emulate(options)`](#pageemulateoptions). Actual list of
devices can be found in [src/DeviceDescriptors.js](https://github.com/puppeteer/puppeteer/blob/main/src/DeviceDescriptors.ts).
devices can be found in [src/common/DeviceDescriptors.js](https://github.com/puppeteer/puppeteer/blob/main/src/common/DeviceDescriptors.ts).
```js
const puppeteer = require('puppeteer');
@ -1332,7 +1332,7 @@ const iPhone = puppeteer.devices['iPhone 6'];
})();
```
List of all available devices is available in the source code: [src/DeviceDescriptors.ts](https://github.com/puppeteer/puppeteer/blob/main/src/DeviceDescriptors.ts).
List of all available devices is available in the source code: [src/common/DeviceDescriptors.ts](https://github.com/puppeteer/puppeteer/blob/main/src/common/DeviceDescriptors.ts).
#### page.emulateMedia(type)
- `type` <?[string]> Changes the CSS media type of the page. The only allowed values are `'screen'`, `'print'` and `null`. Passing `null` disables CSS media emulation.