Changelog for https://github.com/cloudflare/workerd/pull/7053
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
- Issue type
- Documentation
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- javascript
- Domain
- documentation
Research direction
Review the proposed changelog text and the referenced workerd pull request 7053 first, then search the documentation for warnings about AbortController, AbortSignal, EventTarget, and request-handler-only usage. Done means adding the changelog and updating any outdated guidance identified by that search.
Written by the indexing model from the issue text.
Description
Proposed changes
here is a draft of a changelog for https://github.com/cloudflare/workerd/pull/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
https://github.com/cloudflare/workerd/pull/7053
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
- Dominant language
- MDX
- Stars
- 5.2k
- Forks
- 16.8k
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 344
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from cloudflare/cloudflare-docs
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
cloudflare/cloudflare-docs#33517 ·
-
content:edit documentation product:cloudflare-one
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
cloudflare/cloudflare-docs#33311 · 1 comment ·
-
content:edit documentation product:email-service
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
cloudflare/cloudflare-docs#33252 · 1 comment ·
-
content:edit documentation product:artifacts
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
cloudflare/cloudflare-docs#32812 · 1 comment ·
-
product:fundamentals stale
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
cloudflare/cloudflare-docs#32697 · 2 comments ·
All issues in cloudflare/cloudflare-docs
Similar issues
-
user-reported
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Kong/developer.konghq.com#7316 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
HarperFast/skills#96 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
infinispan/infinispan#18150 ·
-
bug triage:deciding
Difficulty 1/5 Under an hour Newbie friendliness 88/100
open-telemetry/otel-arrow#4132 ·
-
Ecosystem: ClawMetry — the Qwen Code reader is now free and open source (follow-up to #9294 / #9338) Opencategory/integration priority/P3 scope/documentation status/ready-for-human type/feature-request
Difficulty 1/5 Under an hour Newbie friendliness 84/100