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.
This commit is contained in:
Andrey Lushnikov
2019-04-19 15:33:06 -07:00
committed by GitHub
parent dde55b0257
commit e3abb0aa32
20 changed files with 1836 additions and 1708 deletions

View File

@@ -70,13 +70,6 @@ const utils = module.exports = {
return PROJECT_ROOT;
},
/**
* @return {*}
*/
requireRoot: function(name) {
return require(path.join(PROJECT_ROOT, name));
},
/**
* @param {!Page} page
* @param {string} frameId