Skip to content

Commit 3732757

Browse files
authored
fix: allow getting a frame from an elementhandle (#8875)
Libraries like pptr-testing-library and expect-puppeteer seem to rely on it.
1 parent 3499e12 commit 3732757

3 files changed

Lines changed: 19 additions & 3 deletions

File tree

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
sidebar_label: ElementHandle.frame
3+
---
4+
5+
# ElementHandle.frame property
6+
7+
**Signature:**
8+
9+
```typescript
10+
class ElementHandle {
11+
get frame(): Frame;
12+
}
13+
```

‎docs/api/puppeteer.elementhandle.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,12 @@ If you're using TypeScript, ElementHandle takes a generic argument that denotes
3939
4040
The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the `ElementHandle` class.
4141
42+
## Properties
43+
44+
| Property | Modifiers | Type | Description |
45+
| ------------------------------------------- | --------------------- | ----------------------------- | ----------- |
46+
| [frame](./puppeteer.elementhandle.frame.md) | <code>readonly</code> | [Frame](./puppeteer.frame.md) | |
47+
4248
## Methods
4349
4450
| Method | Modifiers | Description |

‎src/common/ElementHandle.ts‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,6 @@ export class ElementHandle<
8888
return this.#frame.page();
8989
}
9090

91-
/**
92-
* @internal
93-
*/
9491
get frame(): Frame {
9592
return this.#frame;
9693
}

0 commit comments

Comments
 (0)