Make it clear that the Future is returned immediately
authorMarkus Lanthaler <mark_lanthaler@gmx.net>
Mon, 22 Apr 2013 20:14:50 +0200
changeset 1597 32af88fc2f91
parent 1596 4252a2cb7c06
child 1598 702afa034f77
Make it clear that the Future is returned immediately
spec/latest/json-ld-api/index.html
--- a/spec/latest/json-ld-api/index.html	Mon Apr 22 14:40:31 2013 +0200
+++ b/spec/latest/json-ld-api/index.html	Mon Apr 22 20:14:50 2013 +0200
@@ -3780,11 +3780,13 @@
           <a href="#compaction-algorithm">Compaction algorithm</a>:</p>
 
         <ol class="algorithm">
+          <li>Create a new <tref>Future</tref> <i>future</i> and return it. The
+            following steps are then executed asynchronously.</li>
           <li>If the passed <i>input</i> is a <span class="idlParamType">DOMString</span>
             representing the <tref>IRI</tref> of a remote document, dereference it.
             If the retrieved document has a content type different than
             <code>application/ld+json</code> or <code>application/json</code> or
-            if the document cannot be parsed as JSON, reject the <tref>Future</tref> passing an
+            if the document cannot be parsed as JSON, reject the <i>future</i> passing an
             <code class="error"><a href="#idl-def-JsonLdErrorCode.loading-document-failed">loading document failed</a></code>
             error.</li>
           <li>Initialize a new empty <tref>active context</tref>.</li>
@@ -3808,7 +3810,7 @@
             <i>context</i>, <i>expanded</i> as <i>element</i>, and if passed, the
             <code class="idlMemberName"><a href="#widl-JsonLdOptions-compactArrays">compactArrays</a></code>
             flag in <i>options</i>.</li>
-          <li>Accept the <tref>Future</tref> passing <i>compacted</i>.</li>
+          <li>Accept the <i>future</i> passing <i>compacted</i>.</li>
         </ol>
 
         <dl class="parameters">
@@ -3830,10 +3832,12 @@
           the steps in the <a href="#expansion-algorithm">Expansion algorithm</a>:</p>
 
         <ol class="algorithm">
+          <li>Create a new <tref>Future</tref> <i>future</i> and return it. The
+            following steps are then executed asynchronously.</li>
           <li>If the passed <i>input</i> is a <span class="idlParamType">DOMString</span>
             representing the <tref>IRI</tref> of a remote document, dereference it. If the retrieved document has a content type
             different than <code>application/ld+json</code> or <code>application/json</code> or
-            if the document cannot be parsed as JSON, reject the <tref>Future</tref> passing an
+            if the document cannot be parsed as JSON, reject the <i>future</i> passing an
             <code class="error"><a href="#idl-def-JsonLdErrorCode.loading-document-failed">loading document failed</a></code>
             error.</li>
           <li>Initialize a new empty <tref>active context</tref>.</li>
@@ -3852,7 +3856,7 @@
           <li>Set <i>expanded</i> to the result of using the
             <a href="#expansion-algorithm">Expansion algorithm</a>, passing the
             <tref>active context</tref> and <i>input</i> as <i>element</i>.</li>
-          <li>Accept the <tref>Future</tref> passing <i>expanded</i>.</li>
+          <li>Accept the <i>future</i> passing <i>expanded</i>.</li>
         </ol>
 
         <dl class="parameters">
@@ -3872,10 +3876,12 @@
           according to the steps in the <a href="#flattening-algorithm">Flattening algorithm</a>:</p>
 
         <ol class="algorithm">
+          <li>Create a new <tref>Future</tref> <i>future</i> and return it. The
+            following steps are then executed asynchronously.</li>
           <li>If the passed <i>input</i> is a <span class="idlParamType">DOMString</span>
             representing the <tref>IRI</tref> of a remote document, dereference it. If the retrieved document has a content type
             different than <code>application/ld+json</code> or <code>application/json</code> or
-            if the document cannot be parsed as JSON, reject the <tref>Future</tref> passing an
+            if the document cannot be parsed as JSON, reject the <i>future</i> passing an
             <code class="error"><a href="#idl-def-JsonLdErrorCode.loading-document-failed">loading document failed</a></code>
             error.</li>
           <li>Initialize a new empty <tref>active context</tref>.</li>
@@ -3903,7 +3909,7 @@
             <code class="idlMemberName"><a href="#widl-JsonLdOptions-compactArrays">compactArrays</a></code>
             flag in <i>options</i> (which is internally passed to the
             <a href="#compaction-algorithm">Compaction algorithm</a>).</li>
-          <li>Accept the <tref>Future</tref> passing <i>flattened</i>.</li>
+          <li>Accept the <i>future</i> passing <i>flattened</i>.</li>
         </ol>
 
         <dl class="parameters">