{"action":"created","issue":{"url":"https://api.github.com/repos/melonjs/melonJS/issues/702","labels_url":"https://api.github.com/repos/melonjs/melonJS/issues/702/labels{/name}","comments_url":"https://api.github.com/repos/melonjs/melonJS/issues/702/comments","events_url":"https://api.github.com/repos/melonjs/melonJS/issues/702/events","html_url":"https://github.com/melonjs/melonJS/pull/702","id":93564554,"number":702,"title":"Patched Object.extend simple inheritance to fix conflict with Facebook SDK","user":{"login":"jdrorrer","id":5571603,"avatar_url":"https://avatars.githubusercontent.com/u/5571603?v=3","gravatar_id":"","url":"https://api.github.com/users/jdrorrer","html_url":"https://github.com/jdrorrer","followers_url":"https://api.github.com/users/jdrorrer/followers","following_url":"https://api.github.com/users/jdrorrer/following{/other_user}","gists_url":"https://api.github.com/users/jdrorrer/gists{/gist_id}","starred_url":"https://api.github.com/users/jdrorrer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdrorrer/subscriptions","organizations_url":"https://api.github.com/users/jdrorrer/orgs","repos_url":"https://api.github.com/users/jdrorrer/repos","events_url":"https://api.github.com/users/jdrorrer/events{/privacy}","received_events_url":"https://api.github.com/users/jdrorrer/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/melonjs/melonJS/milestones/20","html_url":"https://github.com/melonjs/melonJS/milestones/2.2.0","labels_url":"https://api.github.com/repos/melonjs/melonJS/milestones/20/labels","id":928007,"number":20,"title":"2.2.0","description":"","creator":{"login":"obiot","id":4033090,"avatar_url":"https://avatars.githubusercontent.com/u/4033090?v=3","gravatar_id":"","url":"https://api.github.com/users/obiot","html_url":"https://github.com/obiot","followers_url":"https://api.github.com/users/obiot/followers","following_url":"https://api.github.com/users/obiot/following{/other_user}","gists_url":"https://api.github.com/users/obiot/gists{/gist_id}","starred_url":"https://api.github.com/users/obiot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/obiot/subscriptions","organizations_url":"https://api.github.com/users/obiot/orgs","repos_url":"https://api.github.com/users/obiot/repos","events_url":"https://api.github.com/users/obiot/events{/privacy}","received_events_url":"https://api.github.com/users/obiot/received_events","type":"User","site_admin":false},"open_issues":31,"closed_issues":13,"state":"open","created_at":"2015-01-09T01:45:25Z","updated_at":"2015-07-08T06:46:10Z","due_on":"2015-07-19T16:00:00Z","closed_at":null},"comments":7,"created_at":"2015-07-07T15:58:51Z","updated_at":"2015-07-08T12:01:02Z","closed_at":"2015-07-07T20:45:51Z","pull_request":{"url":"https://api.github.com/repos/melonjs/melonJS/pulls/702","html_url":"https://github.com/melonjs/melonJS/pull/702","diff_url":"https://github.com/melonjs/melonJS/pull/702.diff","patch_url":"https://github.com/melonjs/melonJS/pull/702.patch"},"body":"Issue: Object.extend in melonJS conflicts with the Facebook SDK causing the SDK to not load properly. melonJS games that try to use the Facebook SDK with melonJS are not able to do so.\r\n\r\nFixes #699. Related to #666. Changes include...\r\n\r\n- attached extend property to me.Object rather than Object (i.e. me.Object.extend)\r\n- attached me.Object.extend to Error.extend\r\n- changed all instances of Object.extend to me.Object.extend\r\n\r\nAlso...\r\n- I updated this jsFiddle with the new changes as well: http://jsfiddle.net/jdrorrer/g07nch75/\r\n- all tests are passing\r\n\r\n<img width=\"194\" alt=\"screen shot 2015-07-07 at 11 49 13 am\" src=\"https://cloud.githubusercontent.com/assets/5571603/8550385/3923d380-249e-11e5-8a4f-3ef2d895656e.png\">\r\n\r\nThe issue can be recreated by forking and building a game built on melonJS that uses the Facebook SDK. A good example of this is Clumsy Bird: https://github.com/ellisonleao/clumsy-bird. It has a Facebook share button when the game ends.\r\n\r\nSide note (maybe for a future update):\r\nHowever, I think an ideal fix (one that should fix #666 completely) would be similar to how string.js uses `S()`: http://stringjs.com/.  melonJS could use the me global and attach all javascript language extensions to it, so that you could call extend like this: `me(Rect).extend`. string.js also has an `extendPrototype()` method. Something like that in melonJS would allow developers to add one line of code in their game and still use `Object.extend()`, `me.Rect.extend()`, etc. the same as they use it today."},"comment":{"url":"https://api.github.com/repos/melonjs/melonJS/issues/comments/119550319","html_url":"https://github.com/melonjs/melonJS/pull/702#issuecomment-119550319","issue_url":"https://api.github.com/repos/melonjs/melonJS/issues/702","id":119550319,"user":{"login":"jdrorrer","id":5571603,"avatar_url":"https://avatars.githubusercontent.com/u/5571603?v=3","gravatar_id":"","url":"https://api.github.com/users/jdrorrer","html_url":"https://github.com/jdrorrer","followers_url":"https://api.github.com/users/jdrorrer/followers","following_url":"https://api.github.com/users/jdrorrer/following{/other_user}","gists_url":"https://api.github.com/users/jdrorrer/gists{/gist_id}","starred_url":"https://api.github.com/users/jdrorrer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdrorrer/subscriptions","organizations_url":"https://api.github.com/users/jdrorrer/orgs","repos_url":"https://api.github.com/users/jdrorrer/repos","events_url":"https://api.github.com/users/jdrorrer/events{/privacy}","received_events_url":"https://api.github.com/users/jdrorrer/received_events","type":"User","site_admin":false},"created_at":"2015-07-08T12:01:02Z","updated_at":"2015-07-08T12:01:02Z","body":"Ahh shucks, thanks guys! Glad to help! :)"}}