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
<spanclass="kd">var</span> date <spanclass="o">=</span><spanclass="k">new</span> Date<spanclass="p">(</span>file<spanclass="p">.</span>lastModified<spanclass="p">)</span><spanclass="p">;</span>
2200
2200
println<spanclass="p">(</span><spanclass="s2">"You selected the file "</span><spanclass="o">+</span> file<spanclass="p">.</span>name <spanclass="o">+</span><spanclass="s2">" which was modified on "</span><spanclass="o">+</span> date<spanclass="p">.</span>toDateString<spanclass="p">(</span><spanclass="p">)</span><spanclass="o">+</span><spanclass="s2">"."</span><spanclass="p">)</span><spanclass="p">;</span>
<spanclass="c1">// Generate a file with a specific last modified date
2205
2205
</span>
2206
2206
<spanclass="kd">var</span> d <spanclass="o">=</span><spanclass="k">new</span> Date<spanclass="p">(</span><spanclass="mi">2013</span><spanclass="p">,</span><spanclass="mi">12</span><spanclass="p">,</span><spanclass="mi">5</span><spanclass="p">,</span><spanclass="mi">16</span><spanclass="p">,</span><spanclass="mi">23</span><spanclass="p">,</span><spanclass="mi">45</span><spanclass="p">,</span><spanclass="mi">600</span><spanclass="p">)</span><spanclass="p">;</span>
<spanclass="c1">//... the loadend event must not fire for the first read
2801
2801
</span>
@@ -3107,7 +3107,9 @@ <h3 class="heading settled" data-level="8.3" id="DefinitionOfScheme"><span class
3107
3107
<h4class="heading settled" data-level="8.3.1" id="originOfBlobURL"><spanclass="secno">8.3.1. </span><spanclass="content"> Origin of Blob URLs</span><aclass="self-link" href="#originOfBlobURL"></a></h4>
3108
3108
<p><adata-link-type="dfn" href="#blob-url" id="ref-for-blob-url-4">Blob URLs</a> are created using <code>URL.<codeclass="idl"><adata-link-type="idl" href="#dfn-createObjectURL" id="ref-for-dfn-createObjectURL-2">createObjectURL()</a></code></code>,
3109
3109
and are revoked using <code>URL.<codeclass="idl"><adata-link-type="idl" href="#dfn-revokeObjectURL" id="ref-for-dfn-revokeObjectURL-1">revokeObjectURL()</a></code></code>.
3110
-
The <dfndata-dfn-type="dfn" data-lt="origin of a Blob URL|Blob URL’s origin" data-noexport="" id="origin-of-a-blob-url">origin of a Blob URL<aclass="self-link" href="#origin-of-a-blob-url"></a></dfn> must be the same as the <adata-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#concept-settings-object-origin">origin</a> specified by the <adata-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#incumbent-settings-object">incumbent settings object</a> at the time the method that created it was called.</p>
3110
+
The <dfnclass="dfn-paneled" data-dfn-type="dfn" data-lt="origin of a Blob URL|Blob URL’s origin" data-noexport="" id="origin-of-a-blob-url">origin of a Blob URL</dfn> must be the same as the <adata-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#concept-settings-object-origin">origin</a> specified by the <adata-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#current-settings-object">current settings object</a> at the time the method that created it was called.</p>
3111
+
<pclass="issue" id="issue-4a4344c2"><aclass="self-link" href="#issue-4a4344c2"></a> there is currently some confusion between the generic definition of the <adata-link-type="dfn" href="https://url.spec.whatwg.org/#concept-url-origin">origin of a URL</a> and the specific definition of the <adata-link-type="dfn" href="#origin-of-a-blob-url" id="ref-for-origin-of-a-blob-url-1">origin of a Blob URL</a>. This is
3112
+
tracked in <ahref="https://github.com/w3c/FileAPI/issues/63">issue #63</a> and in <ahref="https://github.com/whatwg/url/issues/127">whatwg/url#127</a>.</p>
3111
3113
<p><adata-link-type="dfn" href="https://fetch.spec.whatwg.org/#cors-protocol">Cross-origin requests</a> on Blob URLs must return a <adata-link-type="dfn" href="https://fetch.spec.whatwg.org/#concept-network-error">network error</a>.</p>
3112
3114
<pclass="note" role="note"><span>Note:</span> In practice this means that HTTP and HTTPS <adata-link-type="dfn" href="https://html.spec.whatwg.org/multipage/browsers.html#concept-origin">origins</a> are covered by this specification as valid origins for use with Blob URLs.
3113
3115
This specification does not address the case of non-HTTP and non-HTTPS <adata-link-type="dfn" href="https://html.spec.whatwg.org/multipage/browsers.html#concept-origin">origins</a>.
<p>Append the ":" (U+003A COLON) character to <var>result</var>.</p>
3128
3130
<lidata-md="">
3129
-
<p>Let <var>settings</var> be the <adata-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#incumbent-settings-object">incumbent settings object</a></p>
3131
+
<p>Let <var>settings</var> be the <adata-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#current-settings-object">current settings object</a></p>
3130
3132
<lidata-md="">
3131
3133
<p>Let <var>origin</var> be <var>settings</var>’s <adata-link-type="dfn" href="https://html.spec.whatwg.org/multipage/webappapis.html#concept-settings-object-origin">origin</a>.</p>
<p>This section provides sample exchanges between web applications and user agents using <adata-link-type="dfn" href="#blob-url" id="ref-for-blob-url-12">Blob URLs</a>.
3203
-
A <adata-link-type="dfn" href="https://fetch.spec.whatwg.org/#concept-request">request</a> can be triggered using HTML markup of the sort <codeclass="lang-markup highlight"><spanclass="nt"><img</span><spanclass="na">src=</span><spanclass="s">"blob:http://example.org:8080/550e8400-e29b-41d4-a716-446655440000"</span><spanclass="nt">></span></code>.
3205
+
A <adata-link-type="dfn" href="https://fetch.spec.whatwg.org/#concept-request">request</a> can be triggered using HTML markup of the sort <codeclass="lang-markup highlight"><spanclass="p"><</span><spanclass="nt">img</span><spanclass="na">src</span><spanclass="o">=</span><spanclass="s">"blob:http://example.org:8080/550e8400-e29b-41d4-a716-446655440000"</span><spanclass="p">></span></code>.
3204
3206
These examples merely illustrate the <adata-link-type="dfn" href="https://fetch.spec.whatwg.org/#concept-request">request</a> and <adata-link-type="dfn" href="https://fetch.spec.whatwg.org/#concept-response">response</a>;
3205
3207
web developers are not likely to interact with all the headers,
3206
3208
but the <codeclass="idl"><adata-link-type="idl" href="https://xhr.spec.whatwg.org/#dom-xmlhttprequest-getallresponseheaders">getAllResponseHeaders()</a></code> method of <codeclass="idl"><adata-link-type="idl" href="https://xhr.spec.whatwg.org/#xmlhttprequest">XMLHttpRequest</a></code>, if used,
<li><ahref="https://html.spec.whatwg.org/multipage/browsers.html#ascii-serialisation-of-an-origin">ascii serialization of an origin</a>
<divclass="issue"> there is currently some confusion between the generic definition of the <adata-link-type="dfn" href="https://url.spec.whatwg.org/#concept-url-origin">origin of a URL</a> and the specific definition of the <adata-link-type="dfn" href="#origin-of-a-blob-url">origin of a Blob URL</a>. This is
3927
+
tracked in <ahref="https://github.com/w3c/FileAPI/issues/63">issue #63</a> and in <ahref="https://github.com/whatwg/url/issues/127">whatwg/url#127</a>.<ahref="#issue-4a4344c2"> ↵ </a></div>
3924
3928
<divclass="issue"> This section is provisional; more security data may supplement this in subsequent drafts.<ahref="#issue-61296551"> ↵ </a></div>
0 commit comments