{"action":"created","issue":{"url":"https://api.github.com/repos/systemjs/systemjs/issues/406","labels_url":"https://api.github.com/repos/systemjs/systemjs/issues/406/labels{/name}","comments_url":"https://api.github.com/repos/systemjs/systemjs/issues/406/comments","events_url":"https://api.github.com/repos/systemjs/systemjs/issues/406/events","html_url":"https://github.com/systemjs/systemjs/issues/406","id":69001135,"number":406,"title":"global extension safari bug","user":{"login":"MajorBreakfast","id":340142,"avatar_url":"https://avatars.githubusercontent.com/u/340142?v=3","gravatar_id":"","url":"https://api.github.com/users/MajorBreakfast","html_url":"https://github.com/MajorBreakfast","followers_url":"https://api.github.com/users/MajorBreakfast/followers","following_url":"https://api.github.com/users/MajorBreakfast/following{/other_user}","gists_url":"https://api.github.com/users/MajorBreakfast/gists{/gist_id}","starred_url":"https://api.github.com/users/MajorBreakfast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MajorBreakfast/subscriptions","organizations_url":"https://api.github.com/users/MajorBreakfast/orgs","repos_url":"https://api.github.com/users/MajorBreakfast/repos","events_url":"https://api.github.com/users/MajorBreakfast/events{/privacy}","received_events_url":"https://api.github.com/users/MajorBreakfast/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/systemjs/systemjs/labels/fixed%20pending%20release","name":"fixed pending release","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-04-16T20:16:57Z","updated_at":"2015-04-17T19:50:41Z","closed_at":null,"body":"SystemJS's global extension uses `getOwnProperty` on `loader.global`. The method throws an error if called inside a web worker inside safari (iOS 8.3 and desktop version 8.0.2). If I replace the condition in [this code](https://github.com/systemjs/systemjs/blob/98c3de60be24b119f8ca38b1c446ea1b0c74927b/lib/extension-global.js#L53) with a simple `true` it works. That's super strange...\r\n\r\nerror.stack:\r\n```\r\nhasOwnProperty@[native code]\r\nprepareGlobal@http://192.168.0.10:8080/packages/system.src.js:1020:62\r\n...\r\n```\r\n\r\nerror:\r\n```\r\nTypeError: ...\r\nError loading \"github:jmcriffey/bower-traceur@0.0.87\" at http://192.168.0.10:8080/packages/github/jmcriffey/bower-traceur@0.0.87.js\r\nError evaluating http://192.168.0.10:8080/packages/github/jmcriffey/bower-traceur@0.0.87.js\r\nundefined is not an object (evaluating 'loader.global.hasOwnProperty(g)')\r\n```\r\n\r\nI did some research on the internet and this bug appears in other projects as well. https://github.com/facebook/regenerator/issues/183 They fix it by using `getOwnPropertyNames()` instead which is just ES5.1 but for some reason works.\r\n\r\nPossible fixes:\r\n- Drop hasOwnProperty check entirely\r\n- Use hybrid approach. Web workers aren't present on ES3 browsers.\r\n- Use `getOwnrPropertyNames` and expect ES5.1 (Probably not so great for some people)"},"comment":{"url":"https://api.github.com/repos/systemjs/systemjs/issues/comments/94061619","html_url":"https://github.com/systemjs/systemjs/issues/406#issuecomment-94061619","issue_url":"https://api.github.com/repos/systemjs/systemjs/issues/406","id":94061619,"user":{"login":"MajorBreakfast","id":340142,"avatar_url":"https://avatars.githubusercontent.com/u/340142?v=3","gravatar_id":"","url":"https://api.github.com/users/MajorBreakfast","html_url":"https://github.com/MajorBreakfast","followers_url":"https://api.github.com/users/MajorBreakfast/followers","following_url":"https://api.github.com/users/MajorBreakfast/following{/other_user}","gists_url":"https://api.github.com/users/MajorBreakfast/gists{/gist_id}","starred_url":"https://api.github.com/users/MajorBreakfast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MajorBreakfast/subscriptions","organizations_url":"https://api.github.com/users/MajorBreakfast/orgs","repos_url":"https://api.github.com/users/MajorBreakfast/repos","events_url":"https://api.github.com/users/MajorBreakfast/events{/privacy}","received_events_url":"https://api.github.com/users/MajorBreakfast/received_events","type":"User","site_admin":false},"created_at":"2015-04-17T19:50:41Z","updated_at":"2015-04-17T19:50:41Z","body":"It gets the job done without crashing in safari"}}