feat(Targets): expose browser target (#2036)

This patch exposes "browser" target to the list of targets.
This commit is contained in:
Andrey Lushnikov
2018-02-15 13:24:24 -08:00
committed by GitHub
parent e8a085ccfb
commit fc94f98247
3 changed files with 9 additions and 5 deletions

View File

@@ -229,11 +229,11 @@ class Target {
}
/**
* @return {"page"|"service_worker"|"other"}
* @return {"page"|"service_worker"|"other"|"browser"}
*/
type() {
const type = this._targetInfo.type;
if (type === 'page' || type === 'service_worker')
if (type === 'page' || type === 'service_worker' || type === 'browser')
return type;
return 'other';
}