You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
having an <adata-cite="HTML/semantics.html#attr-link-type">type attribute</a>
5624
5623
of <code>application/ld+json</code> along with the value of the
5625
5624
<adata-link-for="LoadDocumentOptions">profile</a> option, if found.</li>
5626
-
<li>If <var>source</var> is undefined and the <adata-link-for="LoadDocumentOptions">extractAllScripts</a> option is not present, or <code>false</code>,
5625
+
<li>If <var>source</var> is still undefined and the <adata-link-for="LoadDocumentOptions">extractAllScripts</a> option is not present, or <code>false</code>,
5627
5626
set <var>source</var> to the <adata-cite="DOM#dom-node-textcontent">textContent</a>
5628
5627
of the first <a>JSON-LD script element</a> in <var>document</var>.
5629
5628
<p>If no such element is found,
5630
5629
or the located element is not a <a>JSON-LD script element</a>,
5631
5630
the <var>promise</var> is rejected with a <a>JsonLdError</a> whose code is set to <adata-link-for="JsonLdErrorCode">loading document failed</a>
using <var>source</var>, rejecting <var>promise</var>
5637
5636
with a <a>JsonLdError</a> whose code set from the result, if an error is detected
5638
5637
and processing is terminated.
5639
5638
</li>
5640
-
<li>Otherwise, if <var>source</var> is undefined and the <adata-link-for="LoadDocumentOptions">extractAllScripts</a> option is not present, or <code>false</code>,
5641
-
the <var>promise</var> is rejected with a <a>JsonLdError</a> whose code is set to <adata-link-for="JsonLdErrorCode">loading document failed</a>
5642
-
and processing is terminated.</li>
5643
-
<li>Otherwise, if <var>source</var> is undefined and the <adata-link-for="LoadDocumentOptions">extractAllScripts</a> option is <code>true</code>,
5644
-
set <var>document</var> to a new empty <a>array</a>.
5645
-
For each <a>JSON-LD script element</a> in <var>input</var>:
5639
+
<li>Otherwise, <var>source</var> is undefined.
5646
5640
<ol>
5647
-
<li>Set <var>source</var> to its <adata-cite="DOM#dom-node-textcontent">textContent</a>.</li>
5648
-
<li>Set <var>script content</var> to the result of the <ahref="#extract-script-content">Extract Script Content algorithm</a>,
5649
-
using <var>source</var>, rejecting <var>promise</var>
5650
-
with a <a>JsonLdError</a> whose code set from the result, if an error is detected
5651
-
and processing is terminated.</li>
5652
-
<li>If <var>script content</var> is an <a>array</a>, merge it to the end of <var>document</var>.</li>
5653
-
<li>Otherwise, append <var>script content</var> to <var>document</var>.</li>
5641
+
<li>If the <adata-link-for="LoadDocumentOptions">extractAllScripts</a> option is not present, or <code>false</code>,
5642
+
the <var>promise</var> is rejected with a <a>JsonLdError</a> whose code is set to <adata-link-for="JsonLdErrorCode">loading document failed</a>
5643
+
and processing is terminated.</li>
5644
+
<li>Otherwise, the <adata-link-for="LoadDocumentOptions">extractAllScripts</a> option is <code>true</code>.
5645
+
Set <var>document</var> to a new empty <a>array</a>.
5646
+
For each <a>JSON-LD script element</a> in <var>input</var>:
5647
+
<ol>
5648
+
<li>Set <var>source</var> to its <adata-cite="DOM#dom-node-textcontent">textContent</a>.</li>
5649
+
<li>Set <var>script content</var> to the result of the <ahref="#extract-script-content">Extract Script Content algorithm</a>,
5650
+
using <var>source</var>, rejecting <var>promise</var>
5651
+
with a <a>JsonLdError</a> whose code set from the result, if an error is detected
5652
+
and processing is terminated.</li>
5653
+
<li>If <var>script content</var> is an <a>array</a>, merge it to the end of <var>document</var>.</li>
5654
+
<li>Otherwise, append <var>script content</var> to <var>document</var>.</li>
5655
+
</ol>
5656
+
</li>
5654
5657
</ol>
5655
5658
</li>
5656
5659
</ol>
5657
5660
</li>
5658
-
<li>Otherwise, if the retrieved document's <a>Content-Type</a> is neither
5661
+
<li>Otherwise, the retrieved document's <a>Content-Type</a> is neither
5659
5662
<code>application/json</code>,
5660
5663
<code>application/ld+json</code>,
5664
+
<code>text/html</code>,
5661
5665
nor any other media type using a
5662
-
<code>+json</code> suffix as defined in [[RFC6839]],
5663
-
reject the <var>promise</var> passing a <adata-link-for="JsonLdErrorCode">loading document failed</a> error.</li>
5666
+
<code>+json</code> suffix as defined in [[RFC6839]].
5667
+
Reject the <var>promise</var> passing a <adata-link-for="JsonLdErrorCode">loading document failed</a> error.</li>
5664
5668
<li>Create a new <a>RemoteDocument</a><var>remote document</var> using <var>document</var>,
5665
5669
the returned <a>Content-Type</a> (without parameters) as <adata-link-for="RemoteDocument">contentType</a>,
5666
5670
any returned <code>profile</code> parameter,
@@ -6084,7 +6088,7 @@ <h2>Changes since JSON-LD Community Group Final Report</h2>
6084
6088
of type <code>application/ld+json;profile=http://www.w3.org/ns/json-ld#context</code>,
6085
6089
or <code>application/ld+json</code> is used as the context for further processing.
6086
6090
This allows a mechanism for documenting the content of a context using HTML.</li>
6087
-
<li>Consolodate<a>RemoteDocument</a> processing into the <a>LoadDocumentCallback</a>
6091
+
<li>Consolidate<a>RemoteDocument</a> processing into the <a>LoadDocumentCallback</a>
0 commit comments