MDN’s new design is in Beta! A sneak peek: https://blog.mozilla.org/opendesign/mdns-new-design-beta/

ウェブのエラーを文書化する方法

この翻訳は不完全です。英語から この記事を翻訳 してください。

The MDN JavaScript error reference is a new project aiming to help web developers with errors occurring in the Developer Console.

You can see this feature in action in Firefox (Developer Edition). JavaScript errors contain a "Learn more" link that takes you to the JavaScript error reference containing additional advice for fixing issues.

In order to help this project, we need to write more error documentation on MDN so that we can add more links to the tools where the messages are thrown.

前提条件

Step 1 – 文書化するエラーを探しましょう

Step 2 – 既存のエラードキュメントを探しましょうlook at existing error docs

  • Look at the existing JavaScript error reference and see how errors are documented.
  • Depending on which type of error you want to write about, you can take a closer look at these pages.
  • You might want to copy the content of an existing page to kick off your new page.

Step 3 – 新しいページを作成します

Step 4 – ページの内容を書きます

  • Either use a copied structure from one of the existing error documents or start from scratch. Your choice!
  • You should have at least:
    • A syntax box containing the message as thrown in different browsers.
    • The error type.
    • A text that explains why this error happened, what its consequences are. Go beyond the thrown message.
    • Examples showcasing the error (there might be more than one!) and an example showing how to fix the code.
    • Pointers to other reference material on MDN.

ドキュメントのタグと貢献者

タグ: 
 このページの貢献者: lv7777
 最終更新者: lv7777,