{"action":"created","issue":{"url":"https://api.github.com/repos/medialize/ally.js/issues/92","labels_url":"https://api.github.com/repos/medialize/ally.js/issues/92/labels{/name}","comments_url":"https://api.github.com/repos/medialize/ally.js/issues/92/comments","events_url":"https://api.github.com/repos/medialize/ally.js/issues/92/events","html_url":"https://github.com/medialize/ally.js/issues/92","id":122881678,"number":92,"title":"Can we make this safe for server-side use?","user":{"login":"JedWatson","id":872310,"avatar_url":"https://avatars.githubusercontent.com/u/872310?v=3","gravatar_id":"","url":"https://api.github.com/users/JedWatson","html_url":"https://github.com/JedWatson","followers_url":"https://api.github.com/users/JedWatson/followers","following_url":"https://api.github.com/users/JedWatson/following{/other_user}","gists_url":"https://api.github.com/users/JedWatson/gists{/gist_id}","starred_url":"https://api.github.com/users/JedWatson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JedWatson/subscriptions","organizations_url":"https://api.github.com/users/JedWatson/orgs","repos_url":"https://api.github.com/users/JedWatson/repos","events_url":"https://api.github.com/users/JedWatson/events{/privacy}","received_events_url":"https://api.github.com/users/JedWatson/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-12-18T05:25:41Z","updated_at":"2015-12-18T09:42:12Z","closed_at":null,"body":"First up, thanks for this library :)\r\n\r\nWe've introduced it into [Elemental UI](http://elemental-ui.com) but it has caused havoc with rendering React components on the server, because it references the `window` global when it is included, specifically [this line](https://github.com/medialize/ally.js/blob/master/src/ally.js#L18) (and possibly others)\r\n\r\nWould you be open to adding support for the library to be loaded in environments that don't have a `window` global? I'd be happy to put together a PR."},"comment":{"url":"https://api.github.com/repos/medialize/ally.js/issues/comments/165730496","html_url":"https://github.com/medialize/ally.js/issues/92#issuecomment-165730496","issue_url":"https://api.github.com/repos/medialize/ally.js/issues/92","id":165730496,"user":{"login":"rodneyrehm","id":186837,"avatar_url":"https://avatars.githubusercontent.com/u/186837?v=3","gravatar_id":"","url":"https://api.github.com/users/rodneyrehm","html_url":"https://github.com/rodneyrehm","followers_url":"https://api.github.com/users/rodneyrehm/followers","following_url":"https://api.github.com/users/rodneyrehm/following{/other_user}","gists_url":"https://api.github.com/users/rodneyrehm/gists{/gist_id}","starred_url":"https://api.github.com/users/rodneyrehm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rodneyrehm/subscriptions","organizations_url":"https://api.github.com/users/rodneyrehm/orgs","repos_url":"https://api.github.com/users/rodneyrehm/repos","events_url":"https://api.github.com/users/rodneyrehm/events{/privacy}","received_events_url":"https://api.github.com/users/rodneyrehm/received_events","type":"User","site_admin":false},"created_at":"2015-12-18T09:42:12Z","updated_at":"2015-12-18T09:42:12Z","body":"> First up, thanks for this library :)\r\n\r\nFirst up, thanks for trying to use it :)\r\n\r\n> Would you be open to adding support for the library to be loaded in environments that don't have a window global?\r\n\r\nOf course the answer is **yes**! \r\n\r\nThe problem is: I don't have such an environment to test that kind of support. Also I have *zero* experience with \"universal JS\". @darobin has expressed the same requirement a couple of weeks ago and I was waiting for him to see what we could do about this.\r\n\r\nThat said, I have no idea what ally.js could possibly do without access to a browser's DOM and BOM. So what do you expect the non-browser environment to achieve with ally.js?\r\n\r\nHow would we go about testing this to avoid regressions? Can we do that in the browser, or do we have to run a second set of tests in Node?\r\n\r\n> I'd be happy to put together a PR.\r\n\r\nI'd love that! How can I help?"}}