{"action":"created","issue":{"url":"https://api.github.com/repos/jashkenas/backbone/issues/3795","labels_url":"https://api.github.com/repos/jashkenas/backbone/issues/3795/labels{/name}","comments_url":"https://api.github.com/repos/jashkenas/backbone/issues/3795/comments","events_url":"https://api.github.com/repos/jashkenas/backbone/issues/3795/events","html_url":"https://github.com/jashkenas/backbone/issues/3795","id":106661321,"number":3795,"title":"inconsistent events callback for 'all'","user":{"login":"ORESoftware","id":11139560,"avatar_url":"https://avatars.githubusercontent.com/u/11139560?v=3","gravatar_id":"","url":"https://api.github.com/users/ORESoftware","html_url":"https://github.com/ORESoftware","followers_url":"https://api.github.com/users/ORESoftware/followers","following_url":"https://api.github.com/users/ORESoftware/following{/other_user}","gists_url":"https://api.github.com/users/ORESoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/ORESoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ORESoftware/subscriptions","organizations_url":"https://api.github.com/users/ORESoftware/orgs","repos_url":"https://api.github.com/users/ORESoftware/repos","events_url":"https://api.github.com/users/ORESoftware/events{/privacy}","received_events_url":"https://api.github.com/users/ORESoftware/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/jashkenas/backbone/labels/invalid","name":"invalid","color":"e6e6e6"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-09-15T22:32:11Z","updated_at":"2015-09-17T15:06:41Z","closed_at":"2015-09-17T15:06:41Z","body":"As far as I can tell, this is a problem\r\n\r\n```javascript\r\nappEvents.on(\"all\", function(eventName){\r\n    console.log(eventName + ' was triggered!'); //works as expected\r\n});\r\n\r\nappEvents.on(\"something-else\", function(eventName){\r\n    console.log(eventName + ' was triggered!'); //nope!! not gonna work, eventName is not automatically available in callback as first argument\r\n});\r\n```\r\n\r\nwhen you listen to all, the first arg is the event name\r\n\r\nbut when you listen to a specific event, the first arg is not the event name\r\n\r\nthis is bad\r\n\r\ncan it be fixed?"},"comment":{"url":"https://api.github.com/repos/jashkenas/backbone/issues/comments/141115950","html_url":"https://github.com/jashkenas/backbone/issues/3795#issuecomment-141115950","issue_url":"https://api.github.com/repos/jashkenas/backbone/issues/3795","id":141115950,"user":{"login":"akre54","id":931368,"avatar_url":"https://avatars.githubusercontent.com/u/931368?v=3","gravatar_id":"","url":"https://api.github.com/users/akre54","html_url":"https://github.com/akre54","followers_url":"https://api.github.com/users/akre54/followers","following_url":"https://api.github.com/users/akre54/following{/other_user}","gists_url":"https://api.github.com/users/akre54/gists{/gist_id}","starred_url":"https://api.github.com/users/akre54/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akre54/subscriptions","organizations_url":"https://api.github.com/users/akre54/orgs","repos_url":"https://api.github.com/users/akre54/repos","events_url":"https://api.github.com/users/akre54/events{/privacy}","received_events_url":"https://api.github.com/users/akre54/received_events","type":"User","site_admin":false},"created_at":"2015-09-17T15:06:41Z","updated_at":"2015-09-17T15:06:41Z","body":"`all` is a special event. We specifically [prepend the event name](https://github.com/jashkenas/backbone/blob/1.2.3/backbone.js#L357) in the `all` callback so that you know what event it was called with. If you bind a listener to the `something-else` event you already know the event that triggered your listener. It's `something-else`."}}