{"action":"created","issue":{"url":"https://api.github.com/repos/gorhill/uBlock/issues/993","labels_url":"https://api.github.com/repos/gorhill/uBlock/issues/993/labels{/name}","comments_url":"https://api.github.com/repos/gorhill/uBlock/issues/993/comments","events_url":"https://api.github.com/repos/gorhill/uBlock/issues/993/events","html_url":"https://github.com/gorhill/uBlock/issues/993","id":60742996,"number":993,"title":"[Safari] [Development tracking] vAPI.download; odd scoping for vAPI.messaging.channel","user":{"login":"chrisaljoudi","id":2351359,"avatar_url":"https://avatars.githubusercontent.com/u/2351359?v=3","gravatar_id":"","url":"https://api.github.com/users/chrisaljoudi","html_url":"https://github.com/chrisaljoudi","followers_url":"https://api.github.com/users/chrisaljoudi/followers","following_url":"https://api.github.com/users/chrisaljoudi/following{/other_user}","gists_url":"https://api.github.com/users/chrisaljoudi/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisaljoudi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisaljoudi/subscriptions","organizations_url":"https://api.github.com/users/chrisaljoudi/orgs","repos_url":"https://api.github.com/users/chrisaljoudi/repos","events_url":"https://api.github.com/users/chrisaljoudi/events{/privacy}","received_events_url":"https://api.github.com/users/chrisaljoudi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":20,"created_at":"2015-03-11T22:46:32Z","updated_at":"2015-03-12T00:26:30Z","closed_at":null,"body":"@gorhill backups use `vAPI.download` which is defined in `vapi-common.js`. The thing is, the function [uses `vAPI.messaging.channel`](https://github.com/gorhill/uBlock/blob/master/platform/chromium/vapi-common.js#L64):\r\n\r\n```\r\nvar messager = vAPI.messaging.channel('_download');\r\n```\r\n\r\nThat's only defined in [`vapi-client.js`](https://github.com/gorhill/uBlock/blob/master/platform/chromium/vapi-client.js#L89). However, `vapi-background.js` seems to [overwrite `vAPI.messaging` altogether](https://github.com/gorhill/uBlock/blob/master/platform/chromium/vapi-background.js#L290) and does **not** define `channel()` for it. \r\n\r\nHow/why does `vAPI.download` work at all in this case?\r\n\r\nThe problem is, it does not work on Safari — and the error is exactly that `vAPI.messaging.channel` is undefined (which, I guess, makes sense).\r\n\r\nIs there something obvious I'm missing? :)"},"comment":{"url":"https://api.github.com/repos/gorhill/uBlock/issues/comments/78402249","html_url":"https://github.com/gorhill/uBlock/issues/993#issuecomment-78402249","issue_url":"https://api.github.com/repos/gorhill/uBlock/issues/993","id":78402249,"user":{"login":"chrisaljoudi","id":2351359,"avatar_url":"https://avatars.githubusercontent.com/u/2351359?v=3","gravatar_id":"","url":"https://api.github.com/users/chrisaljoudi","html_url":"https://github.com/chrisaljoudi","followers_url":"https://api.github.com/users/chrisaljoudi/followers","following_url":"https://api.github.com/users/chrisaljoudi/following{/other_user}","gists_url":"https://api.github.com/users/chrisaljoudi/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisaljoudi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisaljoudi/subscriptions","organizations_url":"https://api.github.com/users/chrisaljoudi/orgs","repos_url":"https://api.github.com/users/chrisaljoudi/repos","events_url":"https://api.github.com/users/chrisaljoudi/events{/privacy}","received_events_url":"https://api.github.com/users/chrisaljoudi/received_events","type":"User","site_admin":false},"created_at":"2015-03-12T00:26:30Z","updated_at":"2015-03-12T00:26:30Z","body":"@gorhill Also, right now, the backed-up file doesn't consider the filename in Safari (defaults to `Unknown`). I'm working on that right now."}}