Leaflet/Leaflet — pull request #2810 by manleyjster (2014-07-23 21:07:36+00:00)
Title: Add comment to removeEventListener in docs

I added the following sentence to the docs for `removeEventListener`:
> Note that if you passed a custom context to addEventListener, you must pass the same context to removeEventListener in order to remove the listener.

I think this will help - it wasn't at all clear to me that this was the case before I looked in the [source code](https://github.com/Leaflet/Leaflet/blob/master/src/core/Events.js).

#### Background ####

It's natural to think that:
```
map.on('zoom', this.myFunction, this);
```
would be removed by:
```
map.off('zoom', this.myFunction).
```
After all, you need to know the context when you're executing the callback, but if you're going to *not* execute the callback, it seems that there's no need for the context.

Turns out, this is *not* the case b/c listeners with custom contexts are stored in a separate hash. It took me a while to figure this out - I was looking at my code and saying: no, that can't be firing because I've already removed those event listeners.

Hope this helps other folks out there.