Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/pptr/src/EventEmitter.ts>EventEmitter#on

Headless Chrome Deno API
Latest
method EventEmitter.prototype.on
import { EventEmitter } from "https://deno.land/x/pptr@1.2.0/src/EventEmitter.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 calls.