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

x/fresh/tests/deps.ts>Page#on

The next-gen web framework.
Extremely Popular
Go to Latest
method Page.prototype.on
Re-export
import { Page } from "https://deno.land/x/fresh@1.2.0/tests/deps.ts";
Listen to page events.

::note

This method exists to define event typings and handle proper wireup of cooperative request interception. Actual event listening and dispatching is delegated to EventEmitter.

::

Type Parameters

K extends keyof PageEventObject

Parameters

eventName: K
handler: (event: PageEventObject[K]) => void

Returns

EventEmitter