I was the editor in question. Note that I have no stake in the outcome of this other than the fact that I truly believe that this edit is completely within the guidelines provided in the help center and throughout meta.
If there is an objective argument as to why this edit is inappropriate, I would happily read it.
Does that edit change the meaning of the answer?
I posit that it does not change the meaning of the answer because the essential concept being conveyed is preserved in the new parenthetical section.
The core problem is highlighted in the title "pass more parameters into callback". The jQuery AJAX stuff was important to the OP, but it isn't what's bringing googlers to the question.
I felt that the specificity of the example was detracting from the answer's true potential usefulness, and was inclined to edit it to make it better.
What I was attempting to do with this edit was extract just that essential concept and display it in the shortest self-contained correct example I could muster, while still being easily understandable.
I also included a single line update about the new arrow function syntax (introduced in the 6th edition of the ECMA-262 standard released June 2015), and its added usefulness in this scenario.
I wanted to respect the author as much as possible, so I left the original code in place, generalized a basic explanation of the code, left the detailed explanation in the authors own words, and generally tried to be the least invasive as possible.
You should have posted your own answer
suggested by answerer's here
This was not a new solution, so posting my own answer would have just been duplication of effort and information. I'm reasonably certain that isn't Stack Overflow's goal.
As far as I can tell from the references I quoted here, there is nothing wrong with my edit, though I would happily read and consider any objective argument as to why my edit was inappropriate.
Quoting the help center editing privilege page: (emphasis original)
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
Tiny, trivial edits are discouraged - try to make the post significantly better when you edit, correcting all problems that you observe.
(https://stackoverflow.com/help/privileges/edit)
Now to highlight the important parts of this:
When should I edit posts?
Any time you feel you can make the post better, and are inclined to do so. Editing is encouraged!
As I said above, I felt I could make the post better, and was inclined to do so. So far so good, but I'm not in the clear yet.
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
To clarify the meaning of a post without changing it
I attempted to clarify the "meaning", which I consider the essential concept that solved the core problem, by highlighting it in its most distilled form.
Add addendums / updates as the post ages
I added the one liner about the new arrow function statement syntax with a reference to relevant documentation.
Next, from The Great Edit Wars (Stack Overflow blog 2009): (emphasis original)
So while the general advice on handling edit wars is roughly the same, here's some detailed guidance specific to our hybrid system.
As it says in the faq: if you aren't comfortable with the community editing your posts, Stack Overflow may not be the right website for you. What we do here is edit posts, together, to make them better and clearer. If you think that's crazy talk and we're all nuts, that's fine. Like I said: there are millions of existing traditional discussion forums on the internet. We're trying to do something different and perhaps more experimental here, so if you're not tolerant of that, posting here is probably .. not advisable. I don't like to see people go, but sometimes it's just not a good fit.
As it says on the sidebar of every edit page, here's what makes up good editing practice as we see it on Stack Overflow:
- Fix grammatical or spelling errors.
- Clarify meaning without changing it.
- Correct minor mistakes.
- Add related resources or links.
- Always respect the original author.
Editing is welcomed and encouraged. However, if the author of the post is resistant to your editing changes, even a perfectly legitimate edit based on the above rules, be the bigger man (or woman) and let them have it their way. Our goal here is not to cause friction between users, or to make everything perfect overnight. All we aim to do is gradually clean up and improve questions and answers together. When in doubt, just move on! There will be plenty of other posts and other edits you can make. In time, that reluctant author will learn how Stack Overflow works.
Again highlighting the important bits: (emphasis original)
As it says in the faq: if you aren't comfortable with the community editing your posts, Stack Overflow may not be the right website for you. What we do here is edit posts, together, to make them better and clearer.
This emphasizes that community collaboration and editing are core concepts of Stack Overflow.
A post is not owned exclusively by the author. The author gets credit for coming up with the original revision and continues to profit over time for that, unless they decide to mark the post as community wiki.
When you mark something community wiki you are telling the world that you don't want any more credit for the content than the rest of the posts contributors.
When you don't mark a post as community wiki, you are not disallowing non-trivial edits.
Editing is welcomed and encouraged. However, if the author of the post is resistant to your editing changes, even a perfectly legitimate edit based on the above rules, be the bigger man (or woman) and let them have it their way.
I left a comment after the edit informing the author and future readers of my edit and the reasoning behind it, while also encouraging the author to roll my edit back if they felt that it deviated to far from the original intent of their question.
When in doubt, just move on!
I'm not in doubt, I am at this point reasonably sure that my edit was correct, and that the original roll back was in error.
I had attempted to discuss my position with the user who rolled back my edit, but did not receive a reply, so I re-applied my edit.
Finally, from In Defense of Editing (Stack Overflow blog 2009): (emphasis original)
Editing is the backbone of Stack Overflow, and probably (along with the reputation system) one of the single most important distinctions between Stack Overflow and "just another forum".
What's so special about editing? You might as well ask what's so special about editing on Wikipedia? Uh... everything?
...
In The Great Edit Wars, we discussed some general guidelines for good editing. Please do read those. But I realized that I could have been clearer, and more specific. So here's some additional guidance.
- If you are going to edit a post, make sure you're substantively improving it. Avoid making isolated, trivial edits, as they are the source of much friction. For example, don't bother changing "its" to "it's" unless you have several other edits to make in the same post. There has to be a legitimate case that your edit made multiple changes transforming the post from good to great -- or at least substantively improving it.
This details the fact that editing is one of the most important parts of Stack Overflow, and edits should strive to be substantial, and improve the post as much as possible, not be limited to simple grammar, spelling, and layout fixes.
Those things should be included in your edit at a minimum, but your edit should not consist solely of those things unless those things are the only thing that can be changed in a post.