{"action":"created","issue":{"url":"https://api.github.com/repos/systemjs/systemjs/issues/421","labels_url":"https://api.github.com/repos/systemjs/systemjs/issues/421/labels{/name}","comments_url":"https://api.github.com/repos/systemjs/systemjs/issues/421/comments","events_url":"https://api.github.com/repos/systemjs/systemjs/issues/421/events","html_url":"https://github.com/systemjs/systemjs/issues/421","id":70506800,"number":421,"title":"Chrome Extensions support?","user":{"login":"MrHayato","id":600962,"avatar_url":"https://avatars.githubusercontent.com/u/600962?v=3","gravatar_id":"","url":"https://api.github.com/users/MrHayato","html_url":"https://github.com/MrHayato","followers_url":"https://api.github.com/users/MrHayato/followers","following_url":"https://api.github.com/users/MrHayato/following{/other_user}","gists_url":"https://api.github.com/users/MrHayato/gists{/gist_id}","starred_url":"https://api.github.com/users/MrHayato/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MrHayato/subscriptions","organizations_url":"https://api.github.com/users/MrHayato/orgs","repos_url":"https://api.github.com/users/MrHayato/repos","events_url":"https://api.github.com/users/MrHayato/events{/privacy}","received_events_url":"https://api.github.com/users/MrHayato/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/systemjs/systemjs/labels/discussion","name":"discussion","color":"fef2c0"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":14,"created_at":"2015-04-23T20:33:04Z","updated_at":"2015-04-25T19:30:50Z","closed_at":null,"body":"I've been using jspm in most of my projects, and now I'm looking to add it to a new project for a Chrome Extension I'm working on.\r\n\r\nOne of the limitations of writing Chrome Extensions, however, is that as of manifest version 2, [Inline scripts are no longer supported](https://developer.chrome.com/extensions/tut_migration_to_manifest_v2#security-summary). Thus, I am unable to load in my scripts dynamically using system.js.\r\n\r\nI have managed to get around this by modifying system.src.js's `doEval` function, to simply eval:\r\n\r\n```javascript\r\ndoEval = function(source) {\r\n   eval(source);\r\n};\r\n```\r\n\r\nThis works fine now, and I am able to load in my scripts from jspm from my extension as well as as a web app.\r\n\r\nAnother possibility, is to change `script.text = source` to be `script.src = address` but then it didn't execute the contents immediately, which would require a bunch of callbacks.\r\n\r\nIs there another way we could potentially load in the scripts without inline-ing them in a script tag so we could support chrome extensions? Or perhaps a flag to do it another way?"},"comment":{"url":"https://api.github.com/repos/systemjs/systemjs/issues/comments/96267884","html_url":"https://github.com/systemjs/systemjs/issues/421#issuecomment-96267884","issue_url":"https://api.github.com/repos/systemjs/systemjs/issues/421","id":96267884,"user":{"login":"guybedford","id":598730,"avatar_url":"https://avatars.githubusercontent.com/u/598730?v=3","gravatar_id":"","url":"https://api.github.com/users/guybedford","html_url":"https://github.com/guybedford","followers_url":"https://api.github.com/users/guybedford/followers","following_url":"https://api.github.com/users/guybedford/following{/other_user}","gists_url":"https://api.github.com/users/guybedford/gists{/gist_id}","starred_url":"https://api.github.com/users/guybedford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guybedford/subscriptions","organizations_url":"https://api.github.com/users/guybedford/orgs","repos_url":"https://api.github.com/users/guybedford/repos","events_url":"https://api.github.com/users/guybedford/events{/privacy}","received_events_url":"https://api.github.com/users/guybedford/received_events","type":"User","site_admin":false},"created_at":"2015-04-25T19:30:50Z","updated_at":"2015-04-25T19:30:50Z","body":"I've included the possible fix in the current release. Still very experimental if this actually works - feedback welcome."}}