28 lines
757 B
Markdown
28 lines
757 B
Markdown
|
---
|
||
|
sidebar_label: EventEmitter.removeAllListeners
|
||
|
---
|
||
|
|
||
|
# EventEmitter.removeAllListeners() method
|
||
|
|
||
|
Removes all listeners. If given an event argument, it will remove only listeners for that event.
|
||
|
|
||
|
**Signature:**
|
||
|
|
||
|
```typescript
|
||
|
class EventEmitter {
|
||
|
removeAllListeners(event?: EventType): EventEmitter;
|
||
|
}
|
||
|
```
|
||
|
|
||
|
## Parameters
|
||
|
|
||
|
| Parameter | Type | Description |
|
||
|
| --------- | ------------------------------------- | ---------------------------------------------------- |
|
||
|
| event | [EventType](./puppeteer.eventtype.md) | <i>(Optional)</i> the event to remove listeners for. |
|
||
|
|
||
|
**Returns:**
|
||
|
|
||
|
[EventEmitter](./puppeteer.eventemitter.md)
|
||
|
|
||
|
`this` to enable you to chain method calls.
|