Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
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.6.1/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