addEventListener

Functionin globals@fastly/js-compute 4.0.0View source
addEventListener(type: K, listener: EventListenerMap[K]): void

This is a fetch specific implementation of addEventListener, and is very similar to handling FetchEvent from a Service Worker.

For Fastly Compute, this will be the entrypoint in handling your downstream request from your client.

Parameters

type: K
listener: EventListenerMap[K]

Returns

void