{"action":"created","comment":{"url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/pulls/comments/42173346","id":42173346,"diff_hunk":"@@ -0,0 +1,118 @@\n+/*global define*/\n+define([\n+    '../ThirdParty/Uri',\n+    '../ThirdParty/when',\n+    './combine',\n+    './defaultValue',\n+    './defined',\n+    './DeveloperError',\n+    './objectToQuery',\n+    './queryToObject'\n+], function(\n+    Uri,\n+    when,\n+    combine,\n+    defaultValue,\n+    defined,\n+    DeveloperError,\n+    objectToQuery,\n+    queryToObject) {\n+    \"use strict\";\n+\n+    /**\n+     * Requests a resource using JSONP.\n+     *\n+     * @exports loadJsonp\n+     *\n+     * @param {String} url The URL to request.\n+     * @param {Object} [options] Object with the following properties:\n+     * @param {Object} [options.parameters] Any extra query parameters to append to the URL.\n+     * @param {String} [options.callbackParameterName='callback'] The callback parameter name that the server expects.\n+     * @param {Proxy} [options.proxy] A proxy to use for the request. This object is expected to have a getURL function which returns the proxied URL, if needed.\n+     * @returns {Promise.<Object>} a promise that will resolve to the requested data when loaded.\n+     *\n+     * @see {@link http://wiki.commonjs.org/wiki/Promises/A|CommonJS Promises/A}\n+     *\n+     * @example\n+     * // load a data asynchronously\n+     * Cesium.loadJsonp('some/webservice').then(function(data) {\n+     *     // use the loaded data\n+     * }).otherwise(function(error) {\n+     *     // an error occurred\n+     * });\n+     */\n+    var loadJsonp = function(url, options) {\n+        //>>includeStart('debug', pragmas.debug);\n+        if (!defined(url)) {\n+            throw new DeveloperError('url is required.');\n+        }\n+        //>>includeEnd('debug');\n+\n+        options = defaultValue(options, defaultValue.EMPTY_OBJECT);\n+\n+        //generate a unique function name\n+        var functionName;\n+        do {\n+            functionName = 'loadJsonp' + Math.random().toString().substring(2, 8);\n+        } while (defined(window[functionName]));\n+\n+        var deferred = when.defer();\n+\n+        //assign a function with that name in the global scope\n+        window[functionName] = function(data) {\n+            deferred.resolve(data);\n+\n+            try {\n+                delete window[functionName];\n+            } catch (e) {","path":"Source/Core/loadJsonp.js","position":67,"original_position":67,"commit_id":"57748bb52675aac1c4f191fe9046e6b46d6a663d","original_commit_id":"57748bb52675aac1c4f191fe9046e6b46d6a663d","user":{"login":"mramato","id":1495196,"avatar_url":"https://avatars.githubusercontent.com/u/1495196?v=3","gravatar_id":"","url":"https://api.github.com/users/mramato","html_url":"https://github.com/mramato","followers_url":"https://api.github.com/users/mramato/followers","following_url":"https://api.github.com/users/mramato/following{/other_user}","gists_url":"https://api.github.com/users/mramato/gists{/gist_id}","starred_url":"https://api.github.com/users/mramato/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mramato/subscriptions","organizations_url":"https://api.github.com/users/mramato/orgs","repos_url":"https://api.github.com/users/mramato/repos","events_url":"https://api.github.com/users/mramato/events{/privacy}","received_events_url":"https://api.github.com/users/mramato/received_events","type":"User","site_admin":false},"body":"Good point, (though it would be an extremely odd circumstance of events to get there).  I'm fine with leaving the code in just to be safe side if you want.","created_at":"2015-10-15T20:07:48Z","updated_at":"2015-10-15T20:07:48Z","html_url":"https://github.com/AnalyticalGraphicsInc/cesium/pull/3098#discussion_r42173346","pull_request_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/pulls/3098","_links":{"self":{"href":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/pulls/comments/42173346"},"html":{"href":"https://github.com/AnalyticalGraphicsInc/cesium/pull/3098#discussion_r42173346"},"pull_request":{"href":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/pulls/3098"}}},"pull_request":{"url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/pulls/3098","id":47804683,"html_url":"https://github.com/AnalyticalGraphicsInc/cesium/pull/3098","diff_url":"https://github.com/AnalyticalGraphicsInc/cesium/pull/3098.diff","patch_url":"https://github.com/AnalyticalGraphicsInc/cesium/pull/3098.patch","issue_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/issues/3098","number":3098,"state":"open","locked":false,"title":"Changed jsonp to loadJsonp","user":{"login":"ggetz","id":4439461,"avatar_url":"https://avatars.githubusercontent.com/u/4439461?v=3","gravatar_id":"","url":"https://api.github.com/users/ggetz","html_url":"https://github.com/ggetz","followers_url":"https://api.github.com/users/ggetz/followers","following_url":"https://api.github.com/users/ggetz/following{/other_user}","gists_url":"https://api.github.com/users/ggetz/gists{/gist_id}","starred_url":"https://api.github.com/users/ggetz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ggetz/subscriptions","organizations_url":"https://api.github.com/users/ggetz/orgs","repos_url":"https://api.github.com/users/ggetz/repos","events_url":"https://api.github.com/users/ggetz/events{/privacy}","received_events_url":"https://api.github.com/users/ggetz/received_events","type":"User","site_admin":false},"body":"Closes #2579\r\n\r\nCreated a new file `loadJsonp` and deprecated `jsonp`. Renamed occurrences of jsonp to loadJsonp. Updated CHANGED.md.\r\n\r\nThere was no Spec for jsonp, but I can add one for loadJsonp if needed.","created_at":"2015-10-15T15:47:05Z","updated_at":"2015-10-15T20:07:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"76bde1af76df12f5563ac4d1ea95e1ff53d9170e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/pulls/3098/commits","review_comments_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/pulls/3098/comments","review_comment_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/pulls/comments{/number}","comments_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/issues/3098/comments","statuses_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/statuses/57748bb52675aac1c4f191fe9046e6b46d6a663d","head":{"label":"ggetz:jsonp-rename","ref":"jsonp-rename","sha":"57748bb52675aac1c4f191fe9046e6b46d6a663d","user":{"login":"ggetz","id":4439461,"avatar_url":"https://avatars.githubusercontent.com/u/4439461?v=3","gravatar_id":"","url":"https://api.github.com/users/ggetz","html_url":"https://github.com/ggetz","followers_url":"https://api.github.com/users/ggetz/followers","following_url":"https://api.github.com/users/ggetz/following{/other_user}","gists_url":"https://api.github.com/users/ggetz/gists{/gist_id}","starred_url":"https://api.github.com/users/ggetz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ggetz/subscriptions","organizations_url":"https://api.github.com/users/ggetz/orgs","repos_url":"https://api.github.com/users/ggetz/repos","events_url":"https://api.github.com/users/ggetz/events{/privacy}","received_events_url":"https://api.github.com/users/ggetz/received_events","type":"User","site_admin":false},"repo":{"id":44200743,"name":"cesium","full_name":"ggetz/cesium","owner":{"login":"ggetz","id":4439461,"avatar_url":"https://avatars.githubusercontent.com/u/4439461?v=3","gravatar_id":"","url":"https://api.github.com/users/ggetz","html_url":"https://github.com/ggetz","followers_url":"https://api.github.com/users/ggetz/followers","following_url":"https://api.github.com/users/ggetz/following{/other_user}","gists_url":"https://api.github.com/users/ggetz/gists{/gist_id}","starred_url":"https://api.github.com/users/ggetz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ggetz/subscriptions","organizations_url":"https://api.github.com/users/ggetz/orgs","repos_url":"https://api.github.com/users/ggetz/repos","events_url":"https://api.github.com/users/ggetz/events{/privacy}","received_events_url":"https://api.github.com/users/ggetz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ggetz/cesium","description":"WebGL virtual globe and map engine","fork":true,"url":"https://api.github.com/repos/ggetz/cesium","forks_url":"https://api.github.com/repos/ggetz/cesium/forks","keys_url":"https://api.github.com/repos/ggetz/cesium/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ggetz/cesium/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ggetz/cesium/teams","hooks_url":"https://api.github.com/repos/ggetz/cesium/hooks","issue_events_url":"https://api.github.com/repos/ggetz/cesium/issues/events{/number}","events_url":"https://api.github.com/repos/ggetz/cesium/events","assignees_url":"https://api.github.com/repos/ggetz/cesium/assignees{/user}","branches_url":"https://api.github.com/repos/ggetz/cesium/branches{/branch}","tags_url":"https://api.github.com/repos/ggetz/cesium/tags","blobs_url":"https://api.github.com/repos/ggetz/cesium/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ggetz/cesium/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ggetz/cesium/git/refs{/sha}","trees_url":"https://api.github.com/repos/ggetz/cesium/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ggetz/cesium/statuses/{sha}","languages_url":"https://api.github.com/repos/ggetz/cesium/languages","stargazers_url":"https://api.github.com/repos/ggetz/cesium/stargazers","contributors_url":"https://api.github.com/repos/ggetz/cesium/contributors","subscribers_url":"https://api.github.com/repos/ggetz/cesium/subscribers","subscription_url":"https://api.github.com/repos/ggetz/cesium/subscription","commits_url":"https://api.github.com/repos/ggetz/cesium/commits{/sha}","git_commits_url":"https://api.github.com/repos/ggetz/cesium/git/commits{/sha}","comments_url":"https://api.github.com/repos/ggetz/cesium/comments{/number}","issue_comment_url":"https://api.github.com/repos/ggetz/cesium/issues/comments{/number}","contents_url":"https://api.github.com/repos/ggetz/cesium/contents/{+path}","compare_url":"https://api.github.com/repos/ggetz/cesium/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ggetz/cesium/merges","archive_url":"https://api.github.com/repos/ggetz/cesium/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ggetz/cesium/downloads","issues_url":"https://api.github.com/repos/ggetz/cesium/issues{/number}","pulls_url":"https://api.github.com/repos/ggetz/cesium/pulls{/number}","milestones_url":"https://api.github.com/repos/ggetz/cesium/milestones{/number}","notifications_url":"https://api.github.com/repos/ggetz/cesium/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ggetz/cesium/labels{/name}","releases_url":"https://api.github.com/repos/ggetz/cesium/releases{/id}","created_at":"2015-10-13T19:49:29Z","updated_at":"2015-10-13T19:49:51Z","pushed_at":"2015-10-15T18:54:26Z","git_url":"git://github.com/ggetz/cesium.git","ssh_url":"git@github.com:ggetz/cesium.git","clone_url":"https://github.com/ggetz/cesium.git","svn_url":"https://github.com/ggetz/cesium","homepage":"cesiumjs.org","size":225404,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"AnalyticalGraphicsInc:master","ref":"master","sha":"aff4b8ae084362401fc2136f5b4dc0d31931a1f2","user":{"login":"AnalyticalGraphicsInc","id":1490220,"avatar_url":"https://avatars.githubusercontent.com/u/1490220?v=3","gravatar_id":"","url":"https://api.github.com/users/AnalyticalGraphicsInc","html_url":"https://github.com/AnalyticalGraphicsInc","followers_url":"https://api.github.com/users/AnalyticalGraphicsInc/followers","following_url":"https://api.github.com/users/AnalyticalGraphicsInc/following{/other_user}","gists_url":"https://api.github.com/users/AnalyticalGraphicsInc/gists{/gist_id}","starred_url":"https://api.github.com/users/AnalyticalGraphicsInc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AnalyticalGraphicsInc/subscriptions","organizations_url":"https://api.github.com/users/AnalyticalGraphicsInc/orgs","repos_url":"https://api.github.com/users/AnalyticalGraphicsInc/repos","events_url":"https://api.github.com/users/AnalyticalGraphicsInc/events{/privacy}","received_events_url":"https://api.github.com/users/AnalyticalGraphicsInc/received_events","type":"Organization","site_admin":false},"repo":{"id":3606738,"name":"cesium","full_name":"AnalyticalGraphicsInc/cesium","owner":{"login":"AnalyticalGraphicsInc","id":1490220,"avatar_url":"https://avatars.githubusercontent.com/u/1490220?v=3","gravatar_id":"","url":"https://api.github.com/users/AnalyticalGraphicsInc","html_url":"https://github.com/AnalyticalGraphicsInc","followers_url":"https://api.github.com/users/AnalyticalGraphicsInc/followers","following_url":"https://api.github.com/users/AnalyticalGraphicsInc/following{/other_user}","gists_url":"https://api.github.com/users/AnalyticalGraphicsInc/gists{/gist_id}","starred_url":"https://api.github.com/users/AnalyticalGraphicsInc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AnalyticalGraphicsInc/subscriptions","organizations_url":"https://api.github.com/users/AnalyticalGraphicsInc/orgs","repos_url":"https://api.github.com/users/AnalyticalGraphicsInc/repos","events_url":"https://api.github.com/users/AnalyticalGraphicsInc/events{/privacy}","received_events_url":"https://api.github.com/users/AnalyticalGraphicsInc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/AnalyticalGraphicsInc/cesium","description":"WebGL virtual globe and map engine","fork":false,"url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium","forks_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/forks","keys_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/teams","hooks_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/hooks","issue_events_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/issues/events{/number}","events_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/events","assignees_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/assignees{/user}","branches_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/branches{/branch}","tags_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/tags","blobs_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/git/refs{/sha}","trees_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/statuses/{sha}","languages_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/languages","stargazers_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/stargazers","contributors_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/contributors","subscribers_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/subscribers","subscription_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/subscription","commits_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/commits{/sha}","git_commits_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/git/commits{/sha}","comments_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/comments{/number}","issue_comment_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/issues/comments{/number}","contents_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/contents/{+path}","compare_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/merges","archive_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/downloads","issues_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/issues{/number}","pulls_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/pulls{/number}","milestones_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/milestones{/number}","notifications_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/labels{/name}","releases_url":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/releases{/id}","created_at":"2012-03-02T22:27:14Z","updated_at":"2015-10-15T13:14:56Z","pushed_at":"2015-10-15T20:06:25Z","git_url":"git://github.com/AnalyticalGraphicsInc/cesium.git","ssh_url":"git@github.com:AnalyticalGraphicsInc/cesium.git","clone_url":"https://github.com/AnalyticalGraphicsInc/cesium.git","svn_url":"https://github.com/AnalyticalGraphicsInc/cesium","homepage":"cesiumjs.org","size":496911,"stargazers_count":980,"watchers_count":980,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":584,"mirror_url":null,"open_issues_count":308,"forks":584,"open_issues":308,"watchers":980,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/pulls/3098"},"html":{"href":"https://github.com/AnalyticalGraphicsInc/cesium/pull/3098"},"issue":{"href":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/issues/3098"},"comments":{"href":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/issues/3098/comments"},"review_comments":{"href":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/pulls/3098/comments"},"review_comment":{"href":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/pulls/3098/commits"},"statuses":{"href":"https://api.github.com/repos/AnalyticalGraphicsInc/cesium/statuses/57748bb52675aac1c4f191fe9046e6b46d6a663d"}}}}