fix(har): do not complain about a lot of listeners (#4675)

This commit is contained in:
Pavel Feldman 2020-12-11 23:15:36 -08:00 committed by GitHub
parent 765b07781c
commit f20518f252
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 6 deletions

View File

@ -1405,7 +1405,7 @@ Shortcut for main frame's [frame.focus()]().
## method: Page.frame
- returns: <[null]|[Frame]>
Returns frame matching the criteria. Returns `null` if no frame matches.
Returns frame matching the specified criteria. Either `name` or `url` must be specified.
```js
const frame = page.frame('frame-name');
@ -1415,8 +1415,6 @@ const frame = page.frame('frame-name');
const frame = page.frame({ url: /.*domain.*/ });
```
Returns frame matching the specified criteria. Either `name` or `url` must be specified.
### param: Page.frame.frameSelector
- `frameSelector` <[string]|[Object]>
- `name` <[string]> frame name specified in the `iframe`'s `name` attribute

View File

@ -1608,7 +1608,7 @@ Shortcut for main frame's [frame.focus(selector[, options])](#framefocusselector
- `url` <[string]|[RegExp]|[Function]> A glob pattern, regex pattern or predicate receiving frame's `url` as a [URL] object.
- returns: <[null]|[Frame]>
Returns frame matching the criteria. Returns `null` if no frame matches.
Returns frame matching the specified criteria. Either `name` or `url` must be specified.
```js
const frame = page.frame('frame-name');
@ -1618,8 +1618,6 @@ const frame = page.frame('frame-name');
const frame = page.frame({ url: /.*domain.*/ });
```
Returns frame matching the specified criteria. Either `name` or `url` must be specified.
#### page.frames()
- returns: <[Array]<[Frame]>>

View File

@ -149,6 +149,7 @@ export class Page extends EventEmitter {
constructor(delegate: PageDelegate, browserContext: BrowserContext) {
super();
this.setMaxListeners(0);
this._delegate = delegate;
this._closedCallback = () => {};
this._closedPromise = new Promise(f => this._closedCallback = f);