fix: allow getting a frame from an elementhandle (#8875)

Libraries like pptr-testing-library and expect-puppeteer seem to
rely on it.
This commit is contained in:
Alex Rudenko 2022-08-31 21:57:02 +02:00 committed by GitHub
parent 3499e1292e
commit 3732757450
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 19 additions and 3 deletions

View File

@ -0,0 +1,13 @@
---
sidebar_label: ElementHandle.frame
---
# ElementHandle.frame property
**Signature:**
```typescript
class ElementHandle {
get frame(): Frame;
}
```

View File

@ -39,6 +39,12 @@ If you're using TypeScript, ElementHandle takes a generic argument that denotes
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. 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.
## Properties
| Property | Modifiers | Type | Description |
| ------------------------------------------- | --------------------- | ----------------------------- | ----------- |
| [frame](./puppeteer.elementhandle.frame.md) | <code>readonly</code> | [Frame](./puppeteer.frame.md) | |
## Methods ## Methods
| Method | Modifiers | Description | | Method | Modifiers | Description |

View File

@ -88,9 +88,6 @@ export class ElementHandle<
return this.#frame.page(); return this.#frame.page();
} }
/**
* @internal
*/
get frame(): Frame { get frame(): Frame {
return this.#frame; return this.#frame;
} }