Commit Graph

7 Commits

Author SHA1 Message Date
Andrey Lushnikov
e3abb0aa32
feat(puppeteer): introduce puppeteer.errors and puppeteer.devices (#4312)
These getters are introduced as a more convenient substitute for
a `require('puppeteer/Errors')` and
`require('puppeteer/DeviceDescriptors')`.

This way we can make cross-browser story nicer - a single require
of `puppeteer` or `puppeteer-firefox` fully defines Puppeteer
environment.
2019-04-19 15:33:06 -07:00
Andrey Lushnikov
61bc51c33a
fix: update device descriptors (#3862)
Fix #3859
2019-01-28 17:19:33 -08:00
Andrey Lushnikov
cd8d750628
fix(devicedescriptors): fix UA in DeviceDescriptors (#2741)
This patch:
- updates `utils/fetch_devices.js` script to format UAs for Chrome UAs
  and to add iPhone 6/7/8 as separate devices.
- re-generates `DeviceDescriptors.js` with the new script

Fixes #2730.
2018-06-14 13:55:09 -07:00
Yaniv Efraim
eb1826bc49 feat(DeviceDescriptors): add pixel2/pixel2 xl (#2464)
fixes #2448
2018-04-27 14:45:02 -07:00
xcold
b2389b0734 feat(emulation): add iPhone X and iPhone X landscape (#1631)
This patch adds iPhone X and iPhone X landscape to emulation devices.
2017-12-20 00:30:40 -08:00
Eric Bidelman
1f9b4fb4c8 Change let into const (#457)
This patch:
- changes `let` into `const` throughout codebase
- adds eslint check to prefer const over let
2017-08-21 16:39:04 -07:00
Andrey Lushnikov
139b9e9b6d Get rid of page.emulate() / page.emulatedDevices() methods
This patch:
- gets rid of `page.emulate` and `page.emulatedDevices`
  methods. Instead, it is suggested to use `page.setViewport()`
  and `page.setUserAgent()` methods.
- moves DeviceDescriptors to the top level of the puppeteer so that
  it is convenient to require them.
- improves on documentation to describe the suggested emulation
  approach.

References #88.
2017-07-20 23:53:06 -07:00