Use promise-based document loader.
--- a/playground/playground.js Sun Sep 08 02:19:56 2013 -0400
+++ b/playground/playground.js Sun Sep 08 02:20:11 2013 -0400
@@ -480,7 +480,7 @@
// Add custom document loader that uses a context URL map.
var jqueryDocumentLoader = jsonld.documentLoaders.jquery($);
// FIXME: add UI to let users control and set context mapping
- jsonld.documentLoader = function(url, callback) {
+ jsonld.documentLoader = function(url) {
if(url in playground.contextMap) {
$('#using-context-map').show();
var modified = playground.contextMap[url];
@@ -496,7 +496,7 @@
url = modified;
}
}
- jqueryDocumentLoader(url, callback);
+ return jqueryDocumentLoader(url);
};
// set up buttons to load examples