Update to latest jsonld.js, pass all WebIDL tests.
--- a/playground/jsonld.js Mon May 06 22:28:18 2013 -0700
+++ b/playground/jsonld.js Tue May 07 09:58:54 2013 -0400
@@ -881,12 +881,27 @@
/* WebIDL API */
-function JsonLdProcessor() {};
+function JsonLdProcessor() {}
JsonLdProcessor.prototype = jsonld.futures();
JsonLdProcessor.prototype.toString = function() {
- return '[object JsonLdProcessor]';
+ if(this instanceof JsonLdProcessor) {
+ return '[object JsonLdProcessor]';
+ }
+ return '[object JsonLdProcessorPrototype]';
};
jsonld.JsonLdProcessor = JsonLdProcessor;
+if(Object.defineProperty) {
+ Object.defineProperty(JsonLdProcessor, 'prototype', {
+ writable: false,
+ enumerable: false
+ });
+ Object.defineProperty(JsonLdProcessor.prototype, 'constructor', {
+ writable: true,
+ enumerable: false,
+ configurable: true,
+ value: JsonLdProcessor
+ });
+}
/* Utility API */
--- a/test-suite/idltest/index.html Mon May 06 22:28:18 2013 -0700
+++ b/test-suite/idltest/index.html Tue May 07 09:58:54 2013 -0400
@@ -104,16 +104,6 @@
configurable: true,
value: window.jsonld.JsonLdProcessor
});
- Object.defineProperty(JsonLdProcessor, 'prototype', {
- writable: false,
- enumerable: false
- });
- Object.defineProperty(JsonLdProcessor.prototype, 'constructor', {
- writable: true,
- enumerable: false,
- configurable: true,
- value: JsonLdProcessor
- });
}
// Ensure that stringification tests are passed