{"action":"created","issue":{"url":"https://api.github.com/repos/gorhill/uBlock/issues/1604","repository_url":"https://api.github.com/repos/gorhill/uBlock","labels_url":"https://api.github.com/repos/gorhill/uBlock/issues/1604/labels{/name}","comments_url":"https://api.github.com/repos/gorhill/uBlock/issues/1604/comments","events_url":"https://api.github.com/repos/gorhill/uBlock/issues/1604/events","html_url":"https://github.com/gorhill/uBlock/issues/1604","id":152534323,"number":1604,"title":"uBlock removes WebSocket methods (addEventListener)","user":{"login":"sateffen","id":2326181,"avatar_url":"https://avatars.githubusercontent.com/u/2326181?v=3","gravatar_id":"","url":"https://api.github.com/users/sateffen","html_url":"https://github.com/sateffen","followers_url":"https://api.github.com/users/sateffen/followers","following_url":"https://api.github.com/users/sateffen/following{/other_user}","gists_url":"https://api.github.com/users/sateffen/gists{/gist_id}","starred_url":"https://api.github.com/users/sateffen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sateffen/subscriptions","organizations_url":"https://api.github.com/users/sateffen/orgs","repos_url":"https://api.github.com/users/sateffen/repos","events_url":"https://api.github.com/users/sateffen/events{/privacy}","received_events_url":"https://api.github.com/users/sateffen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-05-02T11:16:43Z","updated_at":"2016-05-02T12:45:53Z","closed_at":null,"body":"### Describe the issue\r\n\r\nThe method *addEventListener* gets removed by this plugin from *window.WebSocket*. This breaks a lot of applications and websites. Deactivating this plugin fixes the problems.\r\n\r\n### One or more specific URLs where the issue occurs\r\n\r\nEvery website that uses this code:\r\n\r\n```\r\nvar w = new window.WebSocket('wss://echo.websocket.org');\r\nw.addEventListener('open', function () { console.log('YEAH'); });\r\n```\r\n\r\nThrows *addEventListener is not a function*.\r\n\r\nExample: https://jsfiddle.net/84do11v6/\r\n\r\n### Steps for anyone to reproduce the issue\r\n\r\n1. Install chrome\r\n1. Install uBlock Origin version 1.7.0\r\n1. Open any website with the above code (like this: https://jsfiddle.net/84do11v6/)\r\n1. Open console (F12) and see the error.\r\n\r\n### Your settings\r\n\r\n- Browser/version: Chrome 50.0.2661.94 m (64-bit)\r\n- uBlock Origin version: 1.7.0\r\n\r\nIf any questions are left, text me.\r\n\r\nThis is pretty critical to me... Hopefully this will be fixed soon."},"comment":{"url":"https://api.github.com/repos/gorhill/uBlock/issues/comments/216225773","html_url":"https://github.com/gorhill/uBlock/issues/1604#issuecomment-216225773","issue_url":"https://api.github.com/repos/gorhill/uBlock/issues/1604","id":216225773,"user":{"login":"octatone","id":492289,"avatar_url":"https://avatars.githubusercontent.com/u/492289?v=3","gravatar_id":"","url":"https://api.github.com/users/octatone","html_url":"https://github.com/octatone","followers_url":"https://api.github.com/users/octatone/followers","following_url":"https://api.github.com/users/octatone/following{/other_user}","gists_url":"https://api.github.com/users/octatone/gists{/gist_id}","starred_url":"https://api.github.com/users/octatone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/octatone/subscriptions","organizations_url":"https://api.github.com/users/octatone/orgs","repos_url":"https://api.github.com/users/octatone/repos","events_url":"https://api.github.com/users/octatone/events{/privacy}","received_events_url":"https://api.github.com/users/octatone/received_events","type":"User","site_admin":false},"created_at":"2016-05-02T12:45:53Z","updated_at":"2016-05-02T12:45:53Z","body":"https://www.wunderlist.com/webapp for example ... even with the site whitelisted messing with the WebSocket class is breaking binding to websockets"}}