- From: Markus Lanthaler <markus.lanthaler@gmx.net>
- Date: Mon, 6 May 2013 13:29:35 +0200
- To: "'Marcos Caceres'" <w3c@marcosc.com>
- Cc: <public-script-coord@w3.org>, <public-rdf-comments@w3.org>
On Sunday, May 05, 2013 7:45 PM, Marcos Caceres wrote: > 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: > http://www.w3.org/TR/WebIDL/#interface-prototype-object That's right. It's currently defined directly in the idltest: https://github.com/json-ld/json-ld.org/blob/master/test-suite/idltest/index.html#L107 I agree it should be moved into jsonld.js > 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: > https://github.com/extensibleweb/webidl.js/blob/master/lib/interfaces/W > ebIDL.js Thanks for the pointer. > 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. That's what I thought, yeah. Did you have a chance to look at API definition in the spec as well? Thanks again, Markus -- Markus Lanthaler @markuslanthaler
Received on Monday, 6 May 2013 11:30:07 UTC