2022-08-06 14:49:20 +00:00
|
|
|
---
|
|
|
|
sidebar_label: CommonEventEmitter.on
|
|
|
|
---
|
|
|
|
|
|
|
|
# CommonEventEmitter.on() method
|
|
|
|
|
2022-10-24 14:31:12 +00:00
|
|
|
#### Signature:
|
2022-08-06 14:49:20 +00:00
|
|
|
|
|
|
|
```typescript
|
|
|
|
interface CommonEventEmitter {
|
2023-05-31 13:09:47 +00:00
|
|
|
on(event: EventType, handler: Handler): this;
|
2022-08-06 14:49:20 +00:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
## Parameters
|
|
|
|
|
|
|
|
| Parameter | Type | Description |
|
|
|
|
| --------- | ------------------------------------- | ----------- |
|
|
|
|
| event | [EventType](./puppeteer.eventtype.md) | |
|
|
|
|
| handler | [Handler](./puppeteer.handler.md) | |
|
|
|
|
|
|
|
|
**Returns:**
|
|
|
|
|
2023-05-31 13:09:47 +00:00
|
|
|
this
|