mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
chore: migrate away from Node's EventEmitter (#5979)
This commit is contained in:
27
new-docs/puppeteer.eventemitter.emit.md
Normal file
27
new-docs/puppeteer.eventemitter.emit.md
Normal file
@@ -0,0 +1,27 @@
|
||||
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
||||
|
||||
[Home](./index.md) > [puppeteer](./puppeteer.md) > [EventEmitter](./puppeteer.eventemitter.md) > [emit](./puppeteer.eventemitter.emit.md)
|
||||
|
||||
## EventEmitter.emit() method
|
||||
|
||||
Emit an event and call any associated listeners.
|
||||
|
||||
<b>Signature:</b>
|
||||
|
||||
```typescript
|
||||
emit(event: EventType, eventData?: any): boolean;
|
||||
```
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --- | --- | --- |
|
||||
| event | EventType | the event you'd like to emit |
|
||||
| eventData | any | any data you'd like to emit with the event |
|
||||
|
||||
<b>Returns:</b>
|
||||
|
||||
boolean
|
||||
|
||||
`true` if there are any listeners, `false` if there are not.
|
||||
|
||||
Reference in New Issue
Block a user