{"action":"opened","issue":{"url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/issues/193","labels_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/issues/193/labels{/name}","comments_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/issues/193/comments","events_url":"https://api.github.com/repos/ParsePlatform/Parse-SDK-JS/issues/193/events","html_url":"https://github.com/ParsePlatform/Parse-SDK-JS/issues/193","id":129582588,"number":193,"title":"Enhancement: Allow Electron to use browser version of Parse JS SDK. ","user":{"login":"typhonrt","id":311473,"avatar_url":"https://avatars.githubusercontent.com/u/311473?v=3","gravatar_id":"","url":"https://api.github.com/users/typhonrt","html_url":"https://github.com/typhonrt","followers_url":"https://api.github.com/users/typhonrt/followers","following_url":"https://api.github.com/users/typhonrt/following{/other_user}","gists_url":"https://api.github.com/users/typhonrt/gists{/gist_id}","starred_url":"https://api.github.com/users/typhonrt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/typhonrt/subscriptions","organizations_url":"https://api.github.com/users/typhonrt/orgs","repos_url":"https://api.github.com/users/typhonrt/repos","events_url":"https://api.github.com/users/typhonrt/events{/privacy}","received_events_url":"https://api.github.com/users/typhonrt/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-01-28T21:09:55Z","updated_at":"2016-01-28T21:09:55Z","closed_at":null,"body":"@andrewimm \r\n\r\nI am now supporting easy integration w/ Electron for [backbone-parse-es6](https://github.com/typhonjs-parse/backbone-parse-es6) via JSPM / SystemJS and [typhonjs-core-gulptasks](https://www.npmjs.com/package/typhonjs-core-gulptasks). An Electron demo version of the canonical TODOS app is available via [electron-backbone-parse-es6-todos-improved](https://github.com/typhonjs-demos/electron-backbone-parse-es6-todos-improved).\r\n\r\nSince Electron is a hybrid Node / browser environment Parse thinks it's running in Node though it can run perfectly fine in browser mode in Electron. \r\n\r\nIn CoreManager `config.IS_NODE` is set here on [lines 113-115](https://github.com/ParsePlatform/Parse-SDK-JS/blob/master/src/CoreManager.js#L113-L115)\r\n\r\nIf one changes this to the following then Parse will run in browser mode in Electron:\r\n```\r\n  IS_NODE: (typeof process !== 'undefined' &&\r\n            !!process.versions &&\r\n            !process.versions.electron &&\r\n            !!process.versions.node),\r\n```\r\n\r\nEverything else works after that. I can't see a way of setting IS_NODE to false before [ParseUser](https://github.com/ParsePlatform/Parse-SDK-JS/blob/master/src/ParseUser.js#L26) and [ParseObject](https://github.com/ParsePlatform/Parse-SDK-JS/blob/master/src/ParseObject.js#L67-L72) set module private variables based on IS_NODE. This occurs on import of `Parse` before any chance to invoke the API or access `Parse.CoreManager` is possible. IE one can't call `Parse.CoreManager.set('IS_NODE', false);` before affected areas of code run.  \r\n\r\nCan you recommend a way forward for allowing Parse to run in browser mode in Electron? \r\n"}}