mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
feat: implement Locators (#10305)
This commit is contained in:
27
docs/api/puppeteer.locator.on.md
Normal file
27
docs/api/puppeteer.locator.on.md
Normal 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\]) => void | |
|
||||
|
||||
**Returns:**
|
||||
|
||||
this
|
||||
Reference in New Issue
Block a user