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.
- Firefox/Gecko's error messages: https://dxr.mozilla.org/mozilla-central/source/js/src/js.msg
- Edge/Chakra's error messages: https://github.com/Microsoft/ChakraCore/blob/master/lib/Parser/rterrors.h
- Chrome/v8's error messages: https://github.com/v8/v8/blob/master/src/messages.h#L75
- 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.
- 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.
Once your page is created, submit it as a PR, and a member of our review team will be assigned automatically to review your page.