2022-08-16 11:58:16 +00:00
|
|
|
---
|
|
|
|
sidebar_label: Frame.name
|
|
|
|
---
|
|
|
|
|
|
|
|
# Frame.name() method
|
|
|
|
|
2024-03-15 15:41:26 +00:00
|
|
|
> Warning: This API is now obsolete.
|
|
|
|
>
|
|
|
|
> Use
|
|
|
|
>
|
|
|
|
> ```ts
|
|
|
|
> const element = await frame.frameElement();
|
|
|
|
> const nameOrId = await element.evaluate(frame => frame.name ?? frame.id);
|
|
|
|
> ```
|
|
|
|
|
2023-04-03 08:23:08 +00:00
|
|
|
The frame's `name` attribute as specified in the tag.
|
|
|
|
|
2022-10-24 14:31:12 +00:00
|
|
|
#### Signature:
|
2022-08-16 11:58:16 +00:00
|
|
|
|
|
|
|
```typescript
|
|
|
|
class Frame {
|
|
|
|
name(): string;
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
**Returns:**
|
|
|
|
|
|
|
|
string
|
|
|
|
|
|
|
|
## Remarks
|
|
|
|
|
|
|
|
This value is calculated once when the frame is created, and will not update if the attribute is changed later.
|