puppeteer/docs/api/puppeteer.jshandle.getproperty.md

49 lines
601 B
Markdown
Raw Normal View History

2022-07-05 13:41:43 +00:00
---
sidebar_label: JSHandle.getProperty
---
# JSHandle.getProperty() method
Fetches a single property from the referenced object.
#### Signature:
2022-07-05 13:41:43 +00:00
```typescript
class JSHandle {
getProperty<K extends keyof T>(
2022-07-05 13:41:43 +00:00
propertyName: HandleOr<K>
): Promise<HandleFor<T[K]>>;
}
```
## Parameters
<table><thead><tr><th>
2022-07-05 13:41:43 +00:00
Parameter
</th><th>
Type
</th><th>
Description
</th></tr></thead>
<tbody><tr><td>
propertyName
</td><td>
[HandleOr](./puppeteer.handleor.md)&lt;K&gt;
</td><td>
</td></tr>
</tbody></table>
2022-07-05 13:41:43 +00:00
**Returns:**
Promise&lt;[HandleFor](./puppeteer.handlefor.md)&lt;T\[K\]&gt;&gt;