class EventEmitter
implements CommonEventEmitter
import { EventEmitter } from "https://deno.land/x/pptr@1.2.0/src/EventEmitter.ts";
The EventEmitter class that many Puppeteer classes extend.
Methods
private
eventListenersCount(event: EventType): numberdeprecated
addListener(event: EventType, handler: Handler): EventEmitterAdd an event listener.
listenerCount(event: EventType): number
Gets the number of listeners for a given event.
off(event: EventType, handler: Handler): EventEmitter
Remove an event listener from firing.
on(event: EventType, handler: Handler): EventEmitter
Bind an event listener to fire when an event occurs.
once(event: EventType, handler: Handler): EventEmitter
Like on
but the listener will only be fired once and then it will be removed.
removeAllListeners(event?: EventType): EventEmitter
Removes all listeners. If given an event argument, it will remove only listeners for that event.
deprecated
removeListener(event: EventType, handler: Handler): EventEmitterRemove an event listener.