feat: implement Locators (#10305)

This commit is contained in:
Alex Rudenko
2023-06-02 19:46:10 +02:00
committed by GitHub
parent e8d044cb8d
commit 1f978f5fc5
30 changed files with 716 additions and 20 deletions

View File

@@ -0,0 +1,27 @@
---
sidebar_label: Locator.on
---
# Locator.on() method
#### Signature:
```typescript
class Locator {
on<K extends keyof LocatorEventObject>(
eventName: K,
handler: (event: LocatorEventObject[K]) => void
): this;
}
```
## Parameters
| Parameter | Type | Description |
| --------- | -------------------------------------------------------------------------------- | ----------- |
| eventName | K | |
| handler | (event: [LocatorEventObject](./puppeteer.locatoreventobject.md)\[K\]) =&gt; void | |
**Returns:**
this