mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
fix(har): do not complain about a lot of listeners (#4675)
This commit is contained in:
parent
765b07781c
commit
f20518f252
@ -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
|
||||
|
@ -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]>>
|
||||
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user