Skip to content

Commit

Permalink
fix(har): do not complain about a lot of listeners (#4675)
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelfeldman committed Dec 12, 2020
1 parent 765b077 commit f20518f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
4 changes: 1 addition & 3 deletions docs-src/api-body.md
Expand Up @@ -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');
Expand All @@ -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
Expand Down
4 changes: 1 addition & 3 deletions docs/api.md
Expand Up @@ -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');
Expand All @@ -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]>>

Expand Down
1 change: 1 addition & 0 deletions src/server/page.ts
Expand Up @@ -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);
Expand Down

0 comments on commit f20518f

Please sign in to comment.