Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Go to Latest
method EventEmitter.prototype.on
import { EventEmitter } from "https://deno.land/x/puppeteer@14.1.1/vendor/puppeteer-core/puppeteer/common/EventEmitter.d.ts";

Bind an event listener to fire when an event occurs.

Parameters

event: EventType
  • the event type you'd like to listen to. Can be a string or symbol.
handler: Handler
  • the function to be called when the event occurs.

Returns

this to enable you to chain method calls.