6

The question I'm talking about is this one:

Check if a div does NOT exist with javascript

It has the most up-votes and people seem to understand it. Someone has put in an edit which adds the following text to it:

The statement `document.getElementById("given-id")` returns `null` if an element with `given-id` doesn't exist, and `null` is falsy meaning that it translates to false when evaluated in an if-statement. ([other falsy values][1])


  [1]: https://developer.mozilla.org/en-US/docs/Glossary/Falsy

Should I reject this? Should the user have written a new answer instead of editing an existing one?

2
  • 1
    That isn't a new answer. That is an explanation of why the current answer works... Reading the comments on the answer makes that clear.
    – Cai
    Aug 30, 2016 at 23:54
  • Cool. So these sort of edits should be accepted then? @Cai
    – James111
    Aug 30, 2016 at 23:55

2 Answers 2

9

To answer your question—no, if the edit is a completely separate answer and not the intent of the original author of the answer then you shouldn't accept the edit.

But. That specific edit isn't a new answer. That is an explanation of why the current answer works... Reading the comments on the answer makes that clear. If it is clear to you that the edit explains or clarifies correctly the intent of the original author then you should accept the edit. If you aren't sure, skip it—don't reject because you aren't sure.

2

When it's not ok edit

Anything that changes the original intent of the post should be rejected. Proposing a new answer within a suggested edit of an answer is not the way to provide fresh information to the sites. Posting another answer, or a self answered question is the way to do this.

clearly conflicts with author's intent

This edit deviates from the original intent of the post. Even edits that must make drastic changes should strive to preserve the goals of the post's owner.

enter image description here

When it's ok to edit

In the case of adding an explanation of why the answer works. This would to "clarify the meaning of a post without changing it".

When should I edit posts?

Any time you feel you can make the post better, and are inclined to do so. Editing is encouraged!

Some common reasons to edit are:

  • to fix grammatical or spelling mistakes
  • to clarify the meaning of a post without changing it
  • to correct minor mistakes or add addendums / updates as the post ages
  • to add related resources or hyperlinks

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .