Skip to content

Commit f20518f

Browse files
authored
fix(har): do not complain about a lot of listeners (#4675)
1 parent 765b077 commit f20518f

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

docs-src/api-body.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1405,7 +1405,7 @@ Shortcut for main frame's [frame.focus()]().
14051405
## method: Page.frame
14061406
- returns: <[null]|[Frame]>
14071407

1408-
Returns frame matching the criteria. Returns `null` if no frame matches.
1408+
Returns frame matching the specified criteria. Either `name` or `url` must be specified.
14091409

14101410
```js
14111411
const frame = page.frame('frame-name');
@@ -1415,8 +1415,6 @@ const frame = page.frame('frame-name');
14151415
const frame = page.frame({ url: /.*domain.*/ });
14161416
```
14171417

1418-
Returns frame matching the specified criteria. Either `name` or `url` must be specified.
1419-
14201418
### param: Page.frame.frameSelector
14211419
- `frameSelector` <[string]|[Object]>
14221420
- `name` <[string]> frame name specified in the `iframe`'s `name` attribute

docs/api.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1608,7 +1608,7 @@ Shortcut for main frame's [frame.focus(selector[, options])](#framefocusselector
16081608
- `url` <[string]|[RegExp]|[Function]> A glob pattern, regex pattern or predicate receiving frame's `url` as a [URL] object.
16091609
- returns: <[null]|[Frame]>
16101610

1611-
Returns frame matching the criteria. Returns `null` if no frame matches.
1611+
Returns frame matching the specified criteria. Either `name` or `url` must be specified.
16121612

16131613
```js
16141614
const frame = page.frame('frame-name');
@@ -1618,8 +1618,6 @@ const frame = page.frame('frame-name');
16181618
const frame = page.frame({ url: /.*domain.*/ });
16191619
```
16201620

1621-
Returns frame matching the specified criteria. Either `name` or `url` must be specified.
1622-
16231621
#### page.frames()
16241622
- returns: <[Array]<[Frame]>>
16251623

src/server/page.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ export class Page extends EventEmitter {
149149

150150
constructor(delegate: PageDelegate, browserContext: BrowserContext) {
151151
super();
152+
this.setMaxListeners(0);
152153
this._delegate = delegate;
153154
this._closedCallback = () => {};
154155
this._closedPromise = new Promise(f => this._closedCallback = f);

0 commit comments

Comments
 (0)