MCPcopy
hub / github.com/mongodb/node-mongodb-native / jsonp

Function jsonp

docs/js/scripts.js:131–148  ·  view source on GitHub ↗
(url)

Source from the content-addressed store, hash-verified

129 }
130
131 function jsonp(url) {
132 var ctx = caches[url] || {};
133 caches[url] = ctx;
134 if(ctx.onload || ctx.data){
135 if(ctx.data){
136 callback(ctx.data);
137 } else {
138 setTimeout(jsonp, 500, url);
139 }
140 }else{
141 ctx.onload = true;
142 $.getJSON(url, function(a){
143 ctx.onload = false;
144 ctx.data = a;
145 callback(a);
146 });
147 }
148 }
149
150 var urlBase = 'https://github.com/' + user + '/' + repo;
151

Callers 1

scripts.jsFile · 0.85

Calls 1

callbackFunction · 0.70

Tested by

no test coverage detected