Update WebIDL to use object[] where we can. Note that (object or object[]) is not supported in respec.
authorGregg Kellogg <gregg@kellogg-assoc.com>
Sat, 24 Mar 2012 18:16:26 -0700
changeset 407 925e99da669e
parent 405 2acddd33b135
child 408 3a4887c9e7be
Update WebIDL to use object[] where we can. Note that (object or object[]) is not supported in respec.
spec/latest/json-ld-api/index.html
--- a/spec/latest/json-ld-api/index.html	Fri Mar 23 21:48:15 2012 -0400
+++ b/spec/latest/json-ld-api/index.html	Sat Mar 24 18:16:26 2012 -0700
@@ -481,10 +481,14 @@
         <a href="#expansion-algorithm">Expansion Algorithm</a>. The
         <code>input</code> MUST be copied, expanded and returned if there are
         no errors. If the expansion fails, an appropriate exception MUST be thrown.
-
+        <div class="issue">This might always return object[].</div>
         <dl class="parameters">
          <dt>object input</dt>
-         <dd>The JSON-LD object to copy and perform the expansion upon.</dd>
+         <dd>The JSON-LD object to copy and perform the expansion upon.
+           <div class="issue">This can be (object or object[]), but the WebIDL processor does not
+             accept this.
+           </div>
+         </dd>
          <dt>object optional? context</dt>
          <dd>An external context to use additionally to the context embedded in <code>input</code> when expanding the <code>input</code>.</dd>
         </dl>
@@ -515,7 +519,11 @@
         thrown.
         <dl class="parameters">
            <dt>object input</dt>
-           <dd>The JSON-LD object to perform compaction on.</dd>
+           <dd>The JSON-LD object to perform compaction on.
+             <div class="issue">This can be (object or object[]), but the WebIDL processor does not
+               accept this.
+             </div>
+           </dd>
            <dt>object? context</dt>
            <dd>The context to use when compacting the <code>input</code>.</dd>
            <dt>boolean optional optimize</dt>
@@ -560,7 +568,11 @@
         errors.
         <dl class="parameters">
            <dt>object input</dt>
-           <dd>The JSON-LD object to perform framing on.</dd>
+           <dd>The JSON-LD object to perform framing on.
+             <div class="issue">This can be (object or object[]), but the WebIDL processor does not
+               accept this.
+             </div>
+           </dd>
            <dt>object frame</dt>
            <dd>The frame to use when re-arranging the data.</dd>
            <dt>object options</dt>
@@ -585,7 +597,7 @@
 
       </dd>
 
-      <dt>object normalize()</dt>
+      <dt>object[] normalize()</dt>
       <dd><a href="#normalization">Normalizes</a> the given <code>input</code>
         according to the steps in the
         <a href="#normalization-algorithm">Normalization Algorithm</a>. The
@@ -593,9 +605,9 @@
         no errors. If the compaction fails, <tref>null</tref> MUST be returned.
         The output is an array of <tref>JSON Object</tref> definitions normalized by the
         <a href="#normalization-algorithm">Normalization Algorithm</a>.
-        <span class="issue">It's still an open question if the result is a DOMString
+        <div class="issue">It's still an open question if the result is a DOMString
           representing the serialized graph in JSON-LD, or an <tref>array</tref> representation
-          which is in normalized form.</span>
+          which is in normalized form.</div>
         <dl class="parameters">
           <dt>object input</dt>
           <dd>The JSON-LD object to perform normalization upon.</dd>
@@ -621,7 +633,7 @@
 
       </dd>
 
-      <dt>object fromTriples()</dt>
+      <dt>object[] fromTriples()</dt>
       <dd>Creates a JSON-LD document given an set of <a>Triple</a>s, in the form of an iterator.
         <dl class="parameters">
           <dt>Triple[] input</dt>
@@ -635,7 +647,11 @@
         the provided <code>tripleCallback</code> for each <a>Triple</a> generated.
         <dl class="parameters">
           <dt>object input</dt>
-          <dd>The JSON-LD object to process when outputting triples.</dd>
+          <dd>The JSON-LD object to process when outputting triples.
+            <div class="issue">This can be (object or object[]), but the WebIDL processor does not
+              accept this.
+            </div>
+          </dd>
           <dt>TripleCallback tripleCallback</dt>
           <dd>A callback that is called a <a>Triple</a> is created from processing
           the given <code>input</code>.</dd>