{"action":"created","issue":{"url":"https://api.github.com/repos/HaxeFoundation/haxe/issues/4490","labels_url":"https://api.github.com/repos/HaxeFoundation/haxe/issues/4490/labels{/name}","comments_url":"https://api.github.com/repos/HaxeFoundation/haxe/issues/4490/comments","events_url":"https://api.github.com/repos/HaxeFoundation/haxe/issues/4490/events","html_url":"https://github.com/HaxeFoundation/haxe/issues/4490","id":101884187,"number":4490,"title":"3.2 final breaks Javascript ContentSecurityPolicy because of fix for 4138","user":{"login":"royag","id":2950169,"avatar_url":"https://avatars.githubusercontent.com/u/2950169?v=3","gravatar_id":"","url":"https://api.github.com/users/royag","html_url":"https://github.com/royag","followers_url":"https://api.github.com/users/royag/followers","following_url":"https://api.github.com/users/royag/following{/other_user}","gists_url":"https://api.github.com/users/royag/gists{/gist_id}","starred_url":"https://api.github.com/users/royag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/royag/subscriptions","organizations_url":"https://api.github.com/users/royag/orgs","repos_url":"https://api.github.com/users/royag/repos","events_url":"https://api.github.com/users/royag/events{/privacy}","received_events_url":"https://api.github.com/users/royag/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/HaxeFoundation/haxe/labels/platform-javascript","name":"platform-javascript","color":"eb6420"}],"state":"open","locked":false,"assignee":{"login":"andyli","id":103977,"avatar_url":"https://avatars.githubusercontent.com/u/103977?v=3","gravatar_id":"","url":"https://api.github.com/users/andyli","html_url":"https://github.com/andyli","followers_url":"https://api.github.com/users/andyli/followers","following_url":"https://api.github.com/users/andyli/following{/other_user}","gists_url":"https://api.github.com/users/andyli/gists{/gist_id}","starred_url":"https://api.github.com/users/andyli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andyli/subscriptions","organizations_url":"https://api.github.com/users/andyli/orgs","repos_url":"https://api.github.com/users/andyli/repos","events_url":"https://api.github.com/users/andyli/events{/privacy}","received_events_url":"https://api.github.com/users/andyli/received_events","type":"User","site_admin":false},"milestone":null,"comments":6,"created_at":"2015-08-19T12:43:29Z","updated_at":"2015-08-31T18:40:35Z","closed_at":null,"body":"producing (as in haxe 3.2):\r\n\r\nvar ArrayBuffer = (Function(\"return typeof ArrayBuffer != 'undefined' ? ArrayBuffer : null\"))() || js_html_compat_ArrayBuffer;\r\n\r\ninstead of (as in haxe 3.2 RC):\r\n\r\nvar ArrayBuffer = typeof(window) != \"undefined\" && window.ArrayBuffer || typeof(global) != \"undefined\" && global.ArrayBuffer || js_html_compat_ArrayBuffer;\r\n\r\nmakes ContentSecurityPolicy consider this to be use of \"unsafe eval\".\r\n\r\nThis makes haxe-produced javascript incompatible with ContentSecurityPolicy.\r\n\r\nIs there maybe a way to fix bug 4138 without resorting eval() ?\r\n\r\nOr maybe one could have a parameter for switching between the two methods ?\r\n"},"comment":{"url":"https://api.github.com/repos/HaxeFoundation/haxe/issues/comments/136459455","html_url":"https://github.com/HaxeFoundation/haxe/issues/4490#issuecomment-136459455","issue_url":"https://api.github.com/repos/HaxeFoundation/haxe/issues/4490","id":136459455,"user":{"login":"aduros","id":23202,"avatar_url":"https://avatars.githubusercontent.com/u/23202?v=3","gravatar_id":"","url":"https://api.github.com/users/aduros","html_url":"https://github.com/aduros","followers_url":"https://api.github.com/users/aduros/followers","following_url":"https://api.github.com/users/aduros/following{/other_user}","gists_url":"https://api.github.com/users/aduros/gists{/gist_id}","starred_url":"https://api.github.com/users/aduros/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aduros/subscriptions","organizations_url":"https://api.github.com/users/aduros/orgs","repos_url":"https://api.github.com/users/aduros/repos","events_url":"https://api.github.com/users/aduros/events{/privacy}","received_events_url":"https://api.github.com/users/aduros/received_events","type":"User","site_admin":false},"created_at":"2015-08-31T18:40:35Z","updated_at":"2015-08-31T18:40:35Z","body":"Unfortunately that hoists the \"use strict\" line out of the closure, which breaks the `return this;` which needs to run in non-strict mode."}}