W3C home > Mailing lists > Public > public-script-coord@w3.org > April to June 2013

Re: API updated to use Futures - request for review

From: Marcos Caceres <w3c@marcosc.com>
Date: Sun, 5 May 2013 18:44:41 +0100
To: Markus Lanthaler <markus.lanthaler@gmx.net>
Cc: public-script-coord@w3.org, public-rdf-comments@w3.org
Message-ID: <4D866635360948A1AFA0C89135256CFD@marcosc.com>

On Sunday, 5 May 2013 at 18:16, Markus Lanthaler wrote:  
> assert_equals: String(JsonLdProcessor.prototype) expected
> "[object JsonLdProcessorPrototype]" but got "[object JsonLdProcessor]"
> Is there any way to pass this test with a JavaScript implementation?  
I think you might have implemented the JsonLdProcessor "interface object" incorrectly (in http://json-ld.org/playground/jsonld.js). It does not seem you implemented the "prototype" object part. See:

In particular, see the part about": "The class string of an interface prototype object is the concatenation of the interface’s identifier and the string “Prototype”."  

It might help to look at an implementation that exports an interface object as per WebIDL:

Note that it's impossible to fake the "native brand" of an object (i.e., you can never actually get it to report [object JsonLdProcessor] ) when testing, so a some point your tests will fail with a JS implementation that is intended to be a host object.  

However, that is OK, so long as the behaviour is identical. 
Received on Sunday, 5 May 2013 17:45:12 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:13 UTC