Make JsonLdCallback document optional, it's not passed if an error occurs
authorMarkus Lanthaler <mark_lanthaler@gmx.net>
Sat, 06 Apr 2013 13:42:43 +0200
changeset 1559 651d20559a19
parent 1558 0e65a3044d33
child 1560 18ab436bc243
Make JsonLdCallback document optional, it's not passed if an error occurs
spec/WD/20130411/json-ld-api/diff-20120712.html
spec/WD/20130411/json-ld-api/index.html
spec/latest/json-ld-api/index.html
test-suite/idltest/index.html
--- a/spec/WD/20130411/json-ld-api/diff-20120712.html	Sat Apr 06 00:16:15 2013 -0400
+++ b/spec/WD/20130411/json-ld-api/diff-20120712.html	Sat Apr 06 13:42:43 2013 +0200
@@ -39351,7 +39351,7 @@
 JsonLdError
 </ins></code></a></span><span class="idlParamName"><ins class="diff-new">
 error
-</ins></span></span>,<span class="idlParam"><span class="idlParamType"><ins class="diff-new">
+</ins></span></span>,<span class="idlParam"><ins class="diff-new">optional </ins><span class="idlParamType"><ins class="diff-new">
 (
 </ins><a><ins class="diff-new">
 object
--- a/spec/WD/20130411/json-ld-api/index.html	Sat Apr 06 00:16:15 2013 -0400
+++ b/spec/WD/20130411/json-ld-api/index.html	Sat Apr 06 13:42:43 2013 +0200
@@ -4369,7 +4369,7 @@
         <a href="#idl-def-JsonLdProcessor" class="idlType"><code>JsonLdProcessor</code></a> has been completed, either successfully or
         by a fatal error.</p>
 
-      <pre class="idl"><span class="idlCallback" id="idl-def-JsonLdCallback">callback <span class="idlCallbackID">JsonLdCallback</span> = <span class="idlCallbackType"><a>void</a></span> (<span class="idlParam"><span class="idlParamType"><a href="#idl-def-JsonLdError" class="idlType"><code>JsonLdError</code></a></span> <span class="idlParamName">error</span></span>, <span class="idlParam"><span class="idlParamType">(<a>object</a> or <a>object[]</a>)</span> <span class="idlParamName">document</span></span>);</span></pre><div class="section"><h5 id="callback-jsonldcallback-parameters">Callback <a class="idlType" href="#idl-def-JsonLdCallback"><code>JsonLdCallback</code></a> Parameters</h5><dl class="callback-members"><dt id="widl-JsonLdCallback-error"><code>error</code> of type <span class="idlMemberType"><a href="#idl-def-JsonLdError" class="idlType"><code>JsonLdError</code></a></span></dt><dd>If the value is <a class="tref internalDFN" title="null" href="#dfn-null">null</a>, then no issue was detected
+      <pre class="idl"><span class="idlCallback" id="idl-def-JsonLdCallback">callback <span class="idlCallbackID">JsonLdCallback</span> = <span class="idlCallbackType"><a>void</a></span> (<span class="idlParam"><span class="idlParamType"><a class="idlType" href="#idl-def-JsonLdError"><code>JsonLdError</code></a></span> <span class="idlParamName">error</span></span>, <span class="idlParam">optional <span class="idlParamType"><a>(object or object[])</a></span> <span class="idlParamName">document</span></span>);</span></pre><section><h5 id="callback-jsonldcallback-parameters">Callback <a class="idlType" href="#idl-def-JsonLdCallback"><code>JsonLdCallback</code></a> Parameters</h5><dl class="callback-members"><dt id="widl-JsonLdCallback-error"><code>error</code> of type <span class="idlMemberType"><a class="idlType" href="#idl-def-JsonLdError"><code>JsonLdError</code></a></span></dt><dd>If the value is <a title="null" class="tref internalDFN" href="#dfn-null">null</a>, then no issue was detected
           during processing. Otherwise, a processing error was detected and
           the details are contained within the <em>error</em> object.</dd><dt id="widl-JsonLdCallback-document"><code>document</code> of type <span class="idlMemberType"><a>(object or object[])</a></span></dt><dd>The processed JSON-LD document.</dd></dl></div>
     </div>
--- a/spec/latest/json-ld-api/index.html	Sat Apr 06 00:16:15 2013 -0400
+++ b/spec/latest/json-ld-api/index.html	Sat Apr 06 13:42:43 2013 +0200
@@ -3943,7 +3943,7 @@
         <dd>If the value is <tref>null</tref>, then no issue was detected
           during processing. Otherwise, a processing error was detected and
           the details are contained within the <em>error</em> object.</dd>
-        <dt>(object or object[]) document</dt>
+        <dt>optional (object or object[]) document</dt>
         <dd>The processed JSON-LD document.</dd>
       </dl>
     </section>
--- a/test-suite/idltest/index.html	Sat Apr 06 00:16:15 2013 -0400
+++ b/test-suite/idltest/index.html	Sat Apr 06 13:42:43 2013 +0200
@@ -36,7 +36,7 @@
 typedef (object or object[] or DOMString) JsonLdInput;
 typedef (object or DOMString) JsonLdContext;
 
-callback JsonLdCallback = void (JsonLdError error, (object or object[]) document);
+callback JsonLdCallback = void (JsonLdError error, optional (object or object[]) document);
 
 callback LoadContextCallback = void (DOMString url, ContextLoadedCallback callback);