Context (ctx) · Cloudflare Workers docs
developers.cloudflare.com · 1,925 words · saved by 1 readers
The Context API in Cloudflare Workers, including props, exports, waitUntil and passThroughOnException.
The Context API provides methods to manage the lifecycle of your Worker or Durable Object. Context is exposed via the following places: As the third parameter in all handlers , including the fetch() handler . ( fetch(request, env, ctx) ) As a class property of the WorkerEntrypoint class ( this.ctx ) Note that the Context API is available strictly in stateless contexts, that is, not Durable Objects . However, Durable Objects have a different object, the Durable Object State , which is available as this.ctx inside a Durable Object class, and provides some of the same functionality as the Context
related reading
- Cloudflare Blogblog.cloudflare.com
- Dynamic context discovery · Cursorcursor.com
- Sandbox SDKsandbox.cloudflare.com
- Markov's Salonmarkovs-salon.vercel.app
- Web Workers, comlink, TypeScript and React | johnnyreillyjohnnyreilly.com
- Cursor Docs — Agent, Rules, MCP, Skills & CLIdocs.cursor.com
- Contextcontext.ai
- Cloudflare Queues - JavaScript APIs · Cloudflare Queues docsdevelopers.cloudflare.com
- Arjun Virkarjunvirk.com
- Asynchronous context tracking | Node.js v26.5.0 Documentationnodejs.org
- Analytics India Magazine — AI & Data Science Newsanalyticsindiamag.com
- Tracing APIopentelemetry.io