Can you add some words on how callback arguments get set
还没有人认领这个 Issue。
评估
- 难度
- 1/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 45/100
- Issue 类型
- 文档
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- javascript
调研方向
首先查看 issue 中的 callback 示例以及 repository 周边的文档,确定应将此说明放在哪里。清楚说明传递给 postResponse 的 err、response 和 body 来自哪里,然后确认不熟悉 callback 参数的读者也能理解该示例。
由索引模型根据 Issue 内容生成。
描述
Thanks for doing this!
Something which throws me whenever I look at callback code, is where the "err, response, body" arguments to postResponse come from. I feel like this is a stumbling block for many people. Thanks again!
var name = document.querySelector('input').value
request({
uri: "http://example.com/upload",
body: name,
method: "POST"
}, postResponse)
}
function postResponse(**err, response, body**) { // <<<<<< here
var statusMessage = document.querySelector('.status')
if (err) return statusMessage.value = err
statusMessage.value = body
}
document.querySelector('form').onsubmit = formSubmit
- 主要语言
- JavaScript
- 星标
- 855
- 派生
- 101
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
max-mapper/callback-hell 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 55/100
max-mapper/callback-hell#41 ·
-
难度 1/5 1 小时以内 新手友好度 45/100
max-mapper/callback-hell#36 · 2 条评论 ·
-
License未关闭
难度 3/5 1-2 天 新手友好度 25/100
max-mapper/callback-hell#35 · 1 条评论 ·
-
难度 1/5 1 小时以内 新手友好度 35/100
max-mapper/callback-hell#33 · 3 条评论 ·
-
async未关闭
难度 3/5 1-2 天 新手友好度 35/100
max-mapper/callback-hell#32 · 1 条评论 · 7 个 reaction ·
查看 max-mapper/callback-hell 的全部 Issue
相似的 Issue
-
[Website] Catalog: unknown sort value and mixed-case technology in the URL break the filters可能已有人在做 @barbierajput378-pixel 今天认领。 未关闭area/website framework/jekyll help wanted language/css language/javascript language/markdown
难度 2/5 1-3 小时 新手友好度 80/100
meshery/meshery.io#3088 · 1 条评论 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
firecrawl/firecrawl-mcp-server#548 ·
维护者通常 1 天内回复
-
Area:WebGL p5.js 2.0+
难度 2/5 1-3 小时 新手友好度 78/100
processing/p5.js#9302 ·
维护者通常 3 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
documentation good first issue hacktoberfest
难度 2/5 1-3 小时 新手友好度 70/100
wassim-azi/agy-powerline#47 ·
维护者通常 1 天内回复