javascript-tutorial / javascript-tutorial/en.javascript.info

Page: Decorators and forwarding, call/apply

未關閉
#2,983 7 則留言 1 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

主要語言
HTML
星號
25.5k
分支
4k
PR 合併指標
30 天內沒有已合併 PR

描述

Decorators and forwarding, call/apply
https://javascript.info/call-apply-decorators

Problem
I've discussed the confusion involving this page of the tutorial with Joseph on the discord server. The call and apply function prototype methods should be introduced on their own before touching on the topic of decorators or caches. The comments on this page are also unanimous in describing the content as confusing.

Possible Solutions

Page Title
Joseph proposed a title change to something like "Wrapper functions and call, apply methods". I agree that the title is misleading or poorly worded. Perhaps it should follow the pattern of the other pages' titles in the Advanced working with functions section:

The apply and call methods

Page Content
I believe the content should be rearranged so that discussion of how the apply and call methods work comes first. The topics of decorators and transparent caching can follow afterwards. There are many uses for these methods, so it's a bit confusing to introduce them as a means to write decorators.

Links
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/apply
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/call

I'll try to get Joseph to chime in if possible.

貢獻指南

這個儲存庫沒有索引到貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

從連結的教學頁面開始,並將其對 call/apply、裝飾器和透明快取的說明與連結的 MDN 參考資料進行比較。完成標準是標題更加清楚,且頁面在裝飾器和快取之前介紹 call/apply,同時教學中反映出修訂後的順序。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
javascript
領域
documentation
Issue 類型
文件
難度
3/5
預估耗時
1-2 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。