/Knowledge/sources/honojs__hono/llms-full/context-event--0201b3633ecf.md
Context: event - hono-docs
Context: event Source evidence: /Sources/honojs hono/provenance.md Canonical citation: https://hono.dev/llms full.txt event Summary You can access Cloudflare...
Context: event
Source evidence: /Sources/honojs__hono/provenance.md Canonical citation: https://hono.dev/llms-full.txt#event
Summary
You can access Cloudflare Workers' specific FetchEvent. This was used in "Service Worker" syntax. But, it is not recommended now. ```ts twoslash import { Hono } from 'hono' declare const key: string declare const data: string type KVNa...
Content
You can access Cloudflare Workers' specific FetchEvent. This was used in "Service Worker" syntax. But, it is not recommended now.
import { Hono } from 'hono'
declare const key: string
declare const data: string
type KVNamespace = any
// ---cut---
// Type definition to make type inference
type Bindings = {
MY_KV: KVNamespace
}
const app = new Hono<{ Bindings: Bindings }>()
// FetchEvent object (only set when using Service Worker syntax)
app.get('/foo', async (c) => {
c.event.waitUntil(c.env.MY_KV.put(key, data))
// ...
})
Metadata
{
"chunk_index": 0,
"citation": "https://hono.dev/llms-full.txt#event",
"coverage_role": "overview",
"qualified_title": "Hono / llms-full / Context > event",
"retrieved_at": "2026-07-02T05:51:01Z",
"section_index": 565,
"source_id": "/honojs/hono",
"source_type": "llms_full",
"target_label": "llms-full",
"title": "Context: event",
"upstream_url": "https://hono.dev/llms-full.txt",
"version": "2026"
}