{"action":"opened","issue":{"url":"https://api.github.com/repos/webcomponents/shadydom/issues/24","repository_url":"https://api.github.com/repos/webcomponents/shadydom","labels_url":"https://api.github.com/repos/webcomponents/shadydom/issues/24/labels{/name}","comments_url":"https://api.github.com/repos/webcomponents/shadydom/issues/24/comments","events_url":"https://api.github.com/repos/webcomponents/shadydom/issues/24/events","html_url":"https://github.com/webcomponents/shadydom/issues/24","id":178992525,"number":24,"title":"removeEventListener broken if same callback is used for 2 events","user":{"login":"valdrinkoshi","id":6173664,"avatar_url":"https://avatars.githubusercontent.com/u/6173664?v=3","gravatar_id":"","url":"https://api.github.com/users/valdrinkoshi","html_url":"https://github.com/valdrinkoshi","followers_url":"https://api.github.com/users/valdrinkoshi/followers","following_url":"https://api.github.com/users/valdrinkoshi/following{/other_user}","gists_url":"https://api.github.com/users/valdrinkoshi/gists{/gist_id}","starred_url":"https://api.github.com/users/valdrinkoshi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/valdrinkoshi/subscriptions","organizations_url":"https://api.github.com/users/valdrinkoshi/orgs","repos_url":"https://api.github.com/users/valdrinkoshi/repos","events_url":"https://api.github.com/users/valdrinkoshi/events{/privacy}","received_events_url":"https://api.github.com/users/valdrinkoshi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-23T23:16:08Z","updated_at":"2016-09-23T23:16:08Z","closed_at":null,"body":"Using the same callback for 2 different events results in the events not being removed. It must have something to do with [this assignment](https://github.com/webcomponents/shadydom/blob/master/src/event-mixin.js#L248)\r\n```js\r\nfunction logEventType(event) {\r\n  console.log(event.type);\r\n}\r\n\r\ndocument.addEventListener('mousedown', logEventType);\r\ndocument.addEventListener('mouseup', logEventType);\r\nconsole.log('added listeners');\r\n\r\nsetTimeout(function() {\r\n  document.removeEventListener('mousedown', logEventType);\r\n  document.removeEventListener('mouseup', logEventType);\r\n  console.log('removed listeners');\r\n}, 1000);\r\n```"}}
{"actor":{"display_login":"valdrinkoshi"}}