Update to latest jsonld.js.
--- a/playground/jsonld.js Sun Apr 07 19:16:00 2013 -0700
+++ b/playground/jsonld.js Mon Apr 08 11:33:21 2013 -0400
@@ -714,9 +714,33 @@
/* WebIDL API */
function JsonLdProcessor() {};
-JsonLdProcessor.prototype.expand = jsonld.expand;
-JsonLdProcessor.prototype.compact = jsonld.compact;
-JsonLdProcessor.prototype.flatten = jsonld.flatten;
+// callback param order unconventional w/WebIDL API
+JsonLdProcessor.prototype.expand = function(input, callback) {
+ var options = {};
+ if(arguments.length > 2) {
+ options = callback;
+ callback = arguments[2];
+ }
+ jsonld.expand(input, options, callback);
+};
+// callback param order unconventional w/WebIDL API
+JsonLdProcessor.prototype.compact = function(input, ctx, callback) {
+ var options = {};
+ if(arguments.length > 3) {
+ options = callback;
+ callback = arguments[3];
+ }
+ jsonld.compact(input, ctx, options, callback);
+};
+// callback param order unconventional w/WebIDL API
+JsonLdProcessor.prototype.flatten = function(input, ctx, callback) {
+ var options = {};
+ if(arguments.length > 3) {
+ options = callback;
+ callback = arguments[3];
+ }
+ jsonld.flatten(input, ctx, options, callback);
+};
JsonLdProcessor.prototype.frame = jsonld.frame;
JsonLdProcessor.prototype.fromRDF = jsonld.fromRDF;
JsonLdProcessor.prototype.toRDF = jsonld.toRDF;