doc: fix URL postMessage example in worker_threads#62203
Open
kovan wants to merge 1 commit into
Open
Conversation
lpinca
approved these changes
Mar 14, 2026
Collaborator
Commit Queue failed- Loading data for nodejs/node/pull/62203 β Done loading data for nodejs/node/pull/62203 ----------------------------------- PR info ------------------------------------ Title doc: fix URL postMessage example in worker_threads (#62203) β Could not retrieve the email or name of the PR author's from user's GitHub profile! Branch kovan:doc-worker-url-postmessage -> nodejs:main Labels doc, author ready, worker Commits 1 - doc: fix URL postMessage example in worker_threads Committers 1 - kovan <xaum.io@gmail.com> PR-URL: https://github.com/nodejs/node/pull/62203 Fixes: https://github.com/nodejs/node/issues/60504 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/62203 Fixes: https://github.com/nodejs/node/issues/60504 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> -------------------------------------------------------------------------------- βΉ This PR was created on Wed, 11 Mar 2026 10:21:10 GMT β Approvals: 1 β - Luigi Pinca (@lpinca): https://github.com/nodejs/node/pull/62203#pullrequestreview-3949229592 β Last GitHub CI successful βΉ Green GitHub CI is sufficient -------------------------------------------------------------------------------- β No git cherry-pick in progress β No git am in progress β No git rebase in progress -------------------------------------------------------------------------------- - Bringing origin/main up to date... From https://github.com/nodejs/node * branch main -> FETCH_HEAD β origin/main is now up-to-date - Downloading patch for 62203 From https://github.com/nodejs/node * branch refs/pull/62203/merge -> FETCH_HEAD β Fetched commits as 5605f6bca4be..4c63b211a5e6 -------------------------------------------------------------------------------- Auto-merging doc/api/worker_threads.md [main fda8b92a33] doc: fix URL postMessage example in worker_threads Author: kovan <xaum.io@gmail.com> Date: Wed Mar 11 01:40:09 2026 +0100 1 file changed, 3 insertions(+), 6 deletions(-) β Patches applied -------------------------------------------------------------------------------- --------------------------------- New Message ---------------------------------- doc: fix URL postMessage example in worker_threadshttps://github.com/nodejs/node/actions/runs/26131088912 |
The example claimed that posting a URL object via MessageChannel would print an empty object, but since v21.0.0 (commit d920b7c) it throws a DataCloneError. Update the example and surrounding text to reflect the current behavior. Fixes: nodejs#60504 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Kit Dallege <xaum.io@gmail.com>
4c63b21 to
dc38a01
Compare
Contributor
Author
|
Added the missing New head: dc38a01 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix the
postMessage(new URL(...))example indoc/api/worker_threads.mdwhich claims to print{}but actually throwsDataCloneErrorsince v21.0.0 (d920b7c).Verified against
src/node_messaging.ccβURLobjects are not serializable and throwDataCloneError: Cannot clone object of unsupported type.Fixes: #60504