Changelog for https://github.com/cloudflare/workerd/pull/7053 #32869
Description
Proposed changes
here is a draft of a changelog for cloudflare/workerd#7053
Create AbortSignals outside request handlers in the Workers runtime
You can now create AbortController and AbortSignal objects during module initialization in Cloudflare Workers:
const controller = new AbortController();
const alreadyCancelled = AbortSignal.abort("cancelled");
export default {
async fetch() {
return Response.json({
cancelled: alreadyCancelled.aborted,
});
},
};This change brings Workers in line with browsers and Node.js. Libraries can now create controllers, requests, and writable streams when you import them without encountering an IoContext error.
You can also observe or abort a signal from a different request running in the same isolate. Workerd routes cancellation to the request that owns each pending operation.
Do not use isolate-local signals when your application requires durable cancellation. Cloudflare may route requests to another isolate or restart an isolate at any time. Use a Durable Object to coordinate those requests.
AbortSignal.timeout() still requires an active request because it schedules a timer.
More consistent event handling
This change also aligns EventTarget behavior with the DOM standard:
- One listener throwing an exception no longer prevents later listeners from running.
abort()no longer throws when an abort listener throws.- Workerd reports listener exceptions through the global
errorevent and console. - Workerd removes listeners registered with
{ signal }before it runs abort listeners. - Events you construct report
isTrusted === false.
Most applications require no changes.
Subject Matter
Content Location
new changelog. also research docs if there is anything we need to update, like warnings saying that you can't do what is now possible
Additional information
No response
Activity
irvinebroque commentedon Aug 19, 2026
/bonk
irvinebroque commentedon Aug 19, 2026
@jasnell
ask-bonk commentedon Aug 19, 2026
This issue proposes adding a changelog entry for cloudflare/workerd#7053, which enables creation of
AbortControllerandAbortSignalobjects during module initialization in Cloudflare Workers.Key points of the proposed change:
AbortController/AbortSignaloutside request handlers (e.g., at module import time), aligning with browsers and Node.jsIoContexterrorsAbortSignal.timeout()still requires an active request (it schedules a timer)EventTargetbehavior (listener exceptions, abort listener ordering,isTrusted === false)Request: Create a new changelog entry and review existing docs for outdated warnings that say this wasn't previously possible.
github run
irvinebroque commentedon Aug 19, 2026
/bonk please fix this issue by making a changelog and any relevant docs updates, make a pr for this
ask-bonk commentedon Aug 19, 2026
Created PR #32870
github run
jasnell commentedon Aug 19, 2026
hmm, I already had one: #32863
github-actions commentedon Oct 6, 2026
Hey there, we've marked this issue as stale because there's no recent activity on it. This label helps us identify long-standing issues in our repo (and not used to auto-close issues).
neelakolkar-cf commentedon Oct 13, 2026
Tracking via #32863