{"action":"created","issue":{"url":"https://api.github.com/repos/ebryn/backburner.js/issues/128","labels_url":"https://api.github.com/repos/ebryn/backburner.js/issues/128/labels{/name}","comments_url":"https://api.github.com/repos/ebryn/backburner.js/issues/128/comments","events_url":"https://api.github.com/repos/ebryn/backburner.js/issues/128/events","html_url":"https://github.com/ebryn/backburner.js/issues/128","id":58732898,"number":128,"title":"Refactor away from relying on `this` in module scope.","user":{"login":"rwjblue","id":12637,"avatar_url":"https://avatars.githubusercontent.com/u/12637?v=3","gravatar_id":"","url":"https://api.github.com/users/rwjblue","html_url":"https://github.com/rwjblue","followers_url":"https://api.github.com/users/rwjblue/followers","following_url":"https://api.github.com/users/rwjblue/following{/other_user}","gists_url":"https://api.github.com/users/rwjblue/gists{/gist_id}","starred_url":"https://api.github.com/users/rwjblue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rwjblue/subscriptions","organizations_url":"https://api.github.com/users/rwjblue/orgs","repos_url":"https://api.github.com/users/rwjblue/repos","events_url":"https://api.github.com/users/rwjblue/events{/privacy}","received_events_url":"https://api.github.com/users/rwjblue/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"stefanpenner","id":1377,"avatar_url":"https://avatars.githubusercontent.com/u/1377?v=3","gravatar_id":"","url":"https://api.github.com/users/stefanpenner","html_url":"https://github.com/stefanpenner","followers_url":"https://api.github.com/users/stefanpenner/followers","following_url":"https://api.github.com/users/stefanpenner/following{/other_user}","gists_url":"https://api.github.com/users/stefanpenner/gists{/gist_id}","starred_url":"https://api.github.com/users/stefanpenner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stefanpenner/subscriptions","organizations_url":"https://api.github.com/users/stefanpenner/orgs","repos_url":"https://api.github.com/users/stefanpenner/repos","events_url":"https://api.github.com/users/stefanpenner/events{/privacy}","received_events_url":"https://api.github.com/users/stefanpenner/received_events","type":"User","site_admin":false},"milestone":null,"comments":4,"created_at":"2015-02-24T12:41:31Z","updated_at":"2015-04-09T00:41:31Z","closed_at":null,"body":"References to `this` in root module scope are no longer guaranteed to be `window`, and some transpilers actively rewrite `this` to `undefined` to ensure future compatibility.\r\n\r\nExample with Esperanto:\r\n\r\nInput (as used [here](https://github.com/ebryn/backburner.js/blob/dab096ce8d7025aa82353c00aa4b5e38f56152e2/lib/backburner.js#L20)):\r\n\r\n```javascript\r\nvar global = this;\r\n``` \r\n\r\nOutput:\r\n\r\n```javascript\r\ndefine(function () {\r\n\r\n\t'use strict';\r\n\r\n\tvar global = undefined;\r\n\r\n});\r\n```\r\n\r\nReplacing `this` with `window` would work in the standard browser case. Does anyone have an issue with detecting `window` and using it?"},"comment":{"url":"https://api.github.com/repos/ebryn/backburner.js/issues/comments/91078923","html_url":"https://github.com/ebryn/backburner.js/issues/128#issuecomment-91078923","issue_url":"https://api.github.com/repos/ebryn/backburner.js/issues/128","id":91078923,"user":{"login":"seanpdoyle","id":2575027,"avatar_url":"https://avatars.githubusercontent.com/u/2575027?v=3","gravatar_id":"","url":"https://api.github.com/users/seanpdoyle","html_url":"https://github.com/seanpdoyle","followers_url":"https://api.github.com/users/seanpdoyle/followers","following_url":"https://api.github.com/users/seanpdoyle/following{/other_user}","gists_url":"https://api.github.com/users/seanpdoyle/gists{/gist_id}","starred_url":"https://api.github.com/users/seanpdoyle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seanpdoyle/subscriptions","organizations_url":"https://api.github.com/users/seanpdoyle/orgs","repos_url":"https://api.github.com/users/seanpdoyle/repos","events_url":"https://api.github.com/users/seanpdoyle/events{/privacy}","received_events_url":"https://api.github.com/users/seanpdoyle/received_events","type":"User","site_admin":false},"created_at":"2015-04-09T00:41:31Z","updated_at":"2015-04-09T00:41:31Z","body":"@rwjblue where in the code would that go?\r\n\r\nHere? https://github.com/ebryn/backburner.js/pull/129/files#diff-02b2bed86440a96ee1cbd07303beb61fR21"}}