Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: flaws in web/api/f* batch 1 #3044

Merged
merged 1 commit into from
Mar 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@
title: FederatedCredential
slug: Web/API/FederatedCredential/FederatedCredential
tags:
- API
- Constructor
- Credential Management API
- FederatedCredential
- NeedsExample
- Reference
- credential management
- API
- Constructor
- Credential Management API
- FederatedCredential
- NeedsExample
- Reference
- credential management
---
<p>{{APIRef("")}}{{Non-standard_header}}</p>

<p><span class="seoSummary">The <strong><code>FederatedCredential</code></strong>
constructor creates a new {{domxref("FederatedCredential")}} object.</span> In
supporting browsers, an instance of this class may be passed the <code>credential</code>
received from the <code>init</code> object for global {{domxref('fetch')}}.</p>
received from the <code>init</code> object for global {{domxref('WindowOrWorkerGlobalScope.fetch')}}.</p>

<h2 id="Syntax">Syntax</h2>

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/federatedcredential/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<p>The <strong><code>FederatedCredential</code></strong> interface of the <a href="/en-US/docs/Web/API/Credential_Management_API">Credential Management API</a> provides information about credentials from a federated identity provider. A federated identity provider is an entity that a website trusts to correctly authenticate a user, and that provides an API for that purpose. <a href="http://openid.net/developers/specs/">OpenID Connect</a> is an example of a federated identity provider framework.</p>

<p>In browsers that support it, an instance of this interface may be passed in the <code>credential</code> member of the <code>init</code> object for global {{domxref('fetch')}}.</p>
<p>In browsers that support it, an instance of this interface may be passed in the <code>credential</code> member of the <code>init</code> object for global {{domxref('WindowOrWorkerGlobalScope.fetch')}}.</p>

<h2 id="Constructor">Constructor</h2>

Expand Down
22 changes: 11 additions & 11 deletions files/en-us/web/api/fetchevent/client/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
title: FetchEvent.client
slug: Web/API/FetchEvent/client
tags:
- API
- Client
- Deprecated
- Experimental
- FetchEvent
- Property
- Reference
- Service Workers
- Workers
- API
- Client
- Deprecated
- Experimental
- FetchEvent
- Property
- Reference
- Service Workers
- Workers
---
<p>{{APIRef("Service Workers API")}}{{deprecated_header()}}</p>

Expand Down Expand Up @@ -46,14 +46,14 @@ <h2 id="Browser_compatibility">Browser compatibility</h2>
<h2 id="See_also">See also</h2>

<ul>
<li><a href="/en-US/docs/Web/API/ServiceWorker_API/Using_Service_Workers">Using Service
<li><a href="/en-US/docs/Web/API/Service_Worker_API/Using_Service_Workers">Using Service
Workers</a></li>
<li><a class="external external-icon" href="https://github.com/mdn/sw-test">Service
workers basic code example</a></li>
<li><a class="external external-icon"
href="https://jakearchibald.github.io/isserviceworkerready/">Is ServiceWorker
ready?</a></li>
<li>{{jsxref("Promise")}}</li>
<li><a href="/en-US/docs/Web/Guide/Performance/Using_web_workers">Using web workers</a>
<li><a href="/en-US/docs/Web/API/Web_Workers_API/Using_web_workers">Using web workers</a>
</li>
</ul>
22 changes: 11 additions & 11 deletions files/en-us/web/api/fetchevent/isreload/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
title: FetchEvent.isReload
slug: Web/API/FetchEvent/isReload
tags:
- API
- Experimental
- FetchEvent
- Property
- Reference
- Service
- Service Workers
- Workers
- isReload
- API
- Experimental
- FetchEvent
- Property
- Reference
- Service
- Service Workers
- Workers
- isReload
---
<div>{{APIRef("Service Workers API")}}{{deprecated_header}}</div>

Expand Down Expand Up @@ -48,14 +48,14 @@ <h2 id="Browser_compatibility">Browser compatibility</h2>
<h2 id="See_also">See also</h2>

<ul>
<li><a href="/en-US/docs/Web/API/ServiceWorker_API/Using_Service_Workers">Using Service
<li><a href="/en-US/docs/Web/API/Service_Worker_API/Using_Service_Workers">Using Service
Workers</a></li>
<li><a class="external external-icon" href="https://github.com/mdn/sw-test">Service
workers basic code example</a></li>
<li><a class="external external-icon"
href="https://jakearchibald.github.io/isserviceworkerready/">Is ServiceWorker
ready?</a></li>
<li>{{jsxref("Promise")}}</li>
<li><a href="/en-US/docs/Web/Guide/Performance/Using_web_workers">Using web workers</a>
<li><a href="/en-US/docs/Web/API/Web_Workers_API/Using_web_workers">Using web workers</a>
</li>
</ul>
20 changes: 10 additions & 10 deletions files/en-us/web/api/fetchevent/request/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
title: FetchEvent.request
slug: Web/API/FetchEvent/request
tags:
- API
- Experimental
- FetchEvent
- Offline
- Property
- Reference
- Service Workers
- Workers
- request
- API
- Experimental
- FetchEvent
- Offline
- Property
- Reference
- Service Workers
- Workers
- request
---
<div>{{APIRef("Service Workers API")}}</div>

Expand Down Expand Up @@ -44,7 +44,7 @@ <h2 id="Example">Example</h2>
object. If no match is found, the code fetches a response from the network.</p>

<p>The code also handles exceptions thrown from the
{{domxref("ServiceWorkerGlobalScope.fetch")}} operation. Note that an HTTP error
{{domxref("WindowOrWorkerGlobalScope.fetch")}} operation. Note that an HTTP error
response (e.g., 404) will not trigger an exception. It will return a normal response
object that has the appropriate error code set.</p>

Expand Down
4 changes: 2 additions & 2 deletions files/en-us/web/api/file/getasdataurl/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

<h2 id="Summary">Summary</h2>

<p>The getAsDataURL provides a <a href="/en-US/docs/data_URIs"><code>data:</code></a> URL that encodes the entire contents of the referenced file.</p>
<p>The getAsDataURL provides a <a href="/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs"><code>data:</code></a> URL that encodes the entire contents of the referenced file.</p>

<div class="note">
<p><strong>Note:</strong> This method is obsolete; you should use the {{domxref("FileReader")}} method {{domxref("FileReader.readAsDataURL","readAsDataURL()")}} instead.</p>
Expand All @@ -30,7 +30,7 @@ <h2 id="Syntax">Syntax</h2>

<h3 id="Returns">Returns</h3>

<p>A string representing a <a href="/en-US/docs/data_URIs"><code>data:</code></a> URL</p>
<p>A string representing a <a href="/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs"><code>data:</code></a> URL</p>

<h2 id="Example">Example</h2>

Expand Down
4 changes: 2 additions & 2 deletions files/en-us/web/api/file/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@

<p><code>File</code> objects are generally retrieved from a {{DOMxRef("FileList")}} object returned as a result of a user selecting files using the {{HTMLElement("input")}} element, from a drag and drop operation's {{DOMxRef("DataTransfer")}} object, or from the <code>mozGetAsFile()</code> API on an {{DOMxRef("HTMLCanvasElement")}}.</p>

<p>A <code>File</code> object is a specific kind of a {{DOMxRef("Blob")}}, and can be used in any context that a Blob can. In particular, {{DOMxRef("FileReader")}}, {{DOMxRef("URL.createObjectURL()")}}, {{DOMxRef("ImageBitmapFactories.createImageBitmap()", "createImageBitmap()")}}, and {{DOMxRef("XMLHttpRequest", "", "send()")}} accept both <code>Blob</code>s and <code>File</code>s.</p>
<p>A <code>File</code> object is a specific kind of a {{DOMxRef("Blob")}}, and can be used in any context that a Blob can. In particular, {{DOMxRef("FileReader")}}, {{DOMxRef("URL.createObjectURL()")}}, {{DOMxRef("WindowOrWorkerGlobalScope/createImageBitmap", "createImageBitmap()")}}, and {{DOMxRef("XMLHttpRequest", "", "send()")}} accept both <code>Blob</code>s and <code>File</code>s.</p>

<p>See <a href="/en-US/docs/Using_files_from_web_applications">Using files from web applications</a> for more information and examples.</p>
<p>See <a href="/en-US/docs/Web/API/File/Using_files_from_web_applications">Using files from web applications</a> for more information and examples.</p>

<p>{{InheritanceDiagram}}</p>

Expand Down
12 changes: 6 additions & 6 deletions files/en-us/web/api/file/name/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
title: File.name
slug: Web/API/File/name
tags:
- API
- File API
- Files
- Property
- Reference
- API
- File API
- Files
- Property
- Reference
---
<div>{{APIRef("File API")}}</div>

Expand Down Expand Up @@ -65,6 +65,6 @@ <h2 id="Browser_compatibility">Browser compatibility</h2>
<h2 id="See_also">See also</h2>

<ul>
<li><a href="/en-US/docs/Using_files_from_web_applications">Using files from web
<li><a href="/en-US/docs/Web/API/File/Using_files_from_web_applications">Using files from web
applications</a></li>
</ul>
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ <h2 id="Limitations_in_Firefox">Limitations in Firefox</h2>
<li>Using drag and drop by calling the {{domxref("DataTransferItem.getAsEntry()")}} method, which lets you get a {{domxref("FileSystemFileEntry")}} or {{domxref("FileSystemDirectoryEntry")}} for files dropped on a drop zone.</li>
</ul>
</li>
<li>You can't use the <code><a href="/en-US/docs/Web/API/LocalFileSystem#requestFileSystem">LocalFileSystem.requestFileSystem()</a></code> method to get access to a specified local file system.</li>
<li>The <code><a href="/en-US/docs/Web/API/LocalFileSystem#resolveLocalFileSystemURL">LocalFileSystem.resolveLocalFileSystemURL()</a></code> method isn't implemented.</li>
<li>You can't use the <code><a href="/en-US/docs/Web/API/LocalFileSystem#requestfilesystem">LocalFileSystem.requestFileSystem()</a></code> method to get access to a specified local file system.</li>
<li>The <code><a href="/en-US/docs/Web/API/LocalFileSystem#resolvelocalfilesystemurl">LocalFileSystem.resolveLocalFileSystemURL()</a></code> method isn't implemented.</li>
<li>Only the asynchronous versions of the interfaces are implemented. Any interfaces with names that end in "<code>Sync"</code> aren't available.</li>
<li>Firefox only supports reading from files in the file system. You can't write to them. In particular, the {{domxref("FileSystemFileEntry.createWriter()")}} method, used to create a {{domxref("FileWriter")}} to handle writing to a file, is not implemented and will just return an error.</li>
<li>Firefox doesn't support the <code>"filesystem:"</code> URL scheme.</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ <h2 id="About_this_document">About this document</h2>

<p>This introduction discusses essential concepts and terminology in the File and Directory Entries API. It gives you the big picture and orients you to <a href="#concepts">key concepts</a>. It also describes <a href="#restrictions">restrictions</a> that raise security errors if you ignore them. To learn more about terminology used in this API, see the <a href="#definitions">Definitions</a> section. </p>

<p>For the reference documentation on the File and Directory Entries API, see the <a href="/en-US/docs/DOM/File_API/File_System_API/FileSystem">reference</a> landing page and its subpages.</p>
<p>For the reference documentation on the File and Directory Entries API, see the <a href="/en-US/docs/Web/API/FileSystem">reference</a> landing page and its subpages.</p>

<p>The specification is still being defined and is subject to change.</p>

<h2 id="Overview">Overview</h2>

<p>The File and Directory Entries API includes both <a href="/en-US/docs/DOM/File_API/File_System_API#Asynchronous_APIs">asynchronous</a> and <a href="/en-US/docs/DOM/File_API/File_System_API#Synchronous_APIs">synchronous</a> versions of the interfaces. The asynchronous API can be used in cases where you don't want an outstanding operation to block the UI. The synchronous API, on the other hand, allows for simpler programming model, but it must be used with <a href="/En/Using_web_workers">WebWorkers</a>. </p>
<p>The File and Directory Entries API includes both <a href="/en-US/docs/Web/API/File_and_Directory_Entries_API/Introduction#asynchronous_apis">asynchronous</a> and <a href="/en-US/docs/Web/API/File_and_Directory_Entries_API/Introduction#synchronous_apis">synchronous</a> versions of the interfaces. The asynchronous API can be used in cases where you don't want an outstanding operation to block the UI. The synchronous API, on the other hand, allows for simpler programming model, but it must be used with <a href="/en-US/Using_web_workers">WebWorkers</a>. </p>

<h3 id="Usefulness_of_the_API">Usefulness of the API</h3>

Expand All @@ -44,7 +44,7 @@ <h3 id="Usefulness_of_the_API">Usefulness of the API</h3>

<h3 id="The_File_and_Directory_Entries_API_and_other_storage_APIs">The File and Directory Entries API and other storage APIs</h3>

<p>The File and Directory Entries API is an alternative to other storage APIs like <a href="/en-US/docs/IndexedDB/Basic_Concepts_Behind_IndexedDB">IndexedDB</a>, WebSQL (which has been deprecated since November18, 2010), and AppCache. The API is a better choice for apps that deal with blobs for the following reasons:</p>
<p>The File and Directory Entries API is an alternative to other storage APIs like <a href="/en-US/docs/Web/API/IndexedDB_API/Basic_Concepts_Behind_IndexedDB">IndexedDB</a>, WebSQL (which has been deprecated since November18, 2010), and AppCache. The API is a better choice for apps that deal with blobs for the following reasons:</p>

<ul>
<li>The File and Directory Entries API offers client-side storage for use cases that are not addressed by databases. If you want to have large mutable chunks of data, the File and Directory Entries API is a much more efficient storage solution than a database.</li>
Expand Down Expand Up @@ -125,7 +125,7 @@ <h3 id="version">The File and Directory Entries API has asynchronous and synchro
<p>The File and Directory Entries API comes with asynchronous and synchronous versions. Both versions of the API offer the same capabilities and features. In fact, they are almost alike, except for a few differences.</p>

<ul>
<li><strong>WebWorkers.</strong> The asynchronous API can be used in either the document or <a href="/En/Using_web_workers" rel="internal">WebWorkers</a> context, while the synchronous API is for use with WebWorkers only. </li>
<li><strong>WebWorkers.</strong> The asynchronous API can be used in either the document or <a href="/en-US/docs/Web/API/Web_Workers_API/Using_web_workers" rel="internal">WebWorkers</a> context, while the synchronous API is for use with WebWorkers only. </li>
<li><strong>Callbacks</strong>. The asynchronous API doesn't give you data by returning values; instead, you have to pass a callback function. You send requests for operations to happen, and get notified by callbacks. In contrast, the synchronous API does not use callbacks because the API methods return values.</li>
<li><strong>Global methods of the asynchronous and synchronous APIs</strong>. The asynchronous API has the following global methods: <code>requestFileSystem()</code> and <code>resolveLocalFileSystemURL()</code>. These methods are members of both the window object and the worker global scope. The synchronous API, on the other hand, uses the following methods:  <code>requestFileSystemSync()</code> and  <code>resolveLocalFileSystemSyncURL()</code>. These synchronous methods are members of the worker's global scope only, not the window object.</li>
</ul>
Expand Down
4 changes: 2 additions & 2 deletions files/en-us/web/api/file_handle_api/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
---
<p>{{non-standard_header}}</p>

<p>The FileHandle API allows for the manipulating of files, including creating files and modifying their content (unlike the <a href="/en-US/docs/DOM/File">File API</a>). Because the files manipulated through that API can be physically stored on the device, the editing part uses a turn-based locking mechanism in order to avoid race issues.</p>
<p>The FileHandle API allows for the manipulating of files, including creating files and modifying their content (unlike the <a href="/en-US/docs/Web/API/File">File API</a>). Because the files manipulated through that API can be physically stored on the device, the editing part uses a turn-based locking mechanism in order to avoid race issues.</p>

<h2 id="API_Overview">API Overview</h2>

Expand All @@ -27,7 +27,7 @@ <h2 id="Basic_operations">Basic operations</h2>

<h3 id="Create_a_FileHandle">Create a FileHandle</h3>

<p>Because the intent is to allow the storage of files through IndexedDB, creating a {{domxref("FileHandle")}} instance requires an <a href="/en-US/docs/IndexedDB/IDBFactory#open">IndexedDB Database</a>.</p>
<p>Because the intent is to allow the storage of files through IndexedDB, creating a {{domxref("IDBMutableFile")}} instance requires an <a href="/en-US/docs/Web/API/IDBFactory#open">IndexedDB Database</a>.</p>

<div style="overflow: hidden;">
<pre class="brush: js">var IDBReq = indexedDB.open("myFileStorageDataBase");
Expand Down
20 changes: 10 additions & 10 deletions files/en-us/web/api/fileentrysync/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
---
<p>{{APIRef("File System API")}} {{Non-standard_header}}</p>

<p>The <code>FileEntrySync</code> interface of the <a href="/en-US/docs/DOM/File_API/File_System_API">File System API</a> represents a file in a file system. It lets you write content to a file.</p>
<p>The <code>FileEntrySync</code> interface of the <a href="/en-US/docs/Web/API/File_and_Directory_Entries_API/Introduction">File System API</a> represents a file in a file system. It lets you write content to a file.</p>

<p>Inherits from: <a href="/en-US/docs/DOM/File_API/File_System_API/EntrySync">EntrySync</a></p>
<p>Inherits from: <a href="/en-US/docs/Web/API/FileSystemEntrySync">EntrySync</a></p>

<h2 id="About_this_document">About this document</h2>

Expand All @@ -30,10 +30,10 @@ <h2 id="Method_overview">Method overview</h2>
<table class="standard-table">
<tbody>
<tr>
<td><code>FileWriterSync <a href="#createreader" title="#createWriter">createWriter</a> () raises (<a href="/en-US/docs/DOM/File_API/File_System_API/FileException">FileException</a>);</code></td>
<td><code>FileWriterSync <a href="#createreader" title="#createWriter">createWriter</a> () raises (<a href="/en-US/docs/Web/API/FileException">FileException</a>);</code></td>
</tr>
<tr>
<td><code>File <a href="#file">file</a> () raises (<a href="/en-US/docs/DOM/File_API/File_System_API/FileException">FileException</a>);</code></td>
<td><code>File <a href="#file">file</a> () raises (<a href="/en-US/docs/Web/API/FileException">FileException</a>);</code></td>
</tr>
</tbody>
</table>
Expand All @@ -45,7 +45,7 @@ <h3 id="createWriter">createWriter()</h3>
<p>Creates a new <code>FileWriter</code> associated with the file that the <code>FileEntry</code> represents.</p>

<pre>void createWriter (
) raises (<a href="https://developer.mozilla.org/en/DOM/File_API/File_System_API/FileException">FileException</a>);</pre>
) raises (<a href="/en-US/docs/Web/API/FileException">FileException</a>);</pre>

<h5 id="Parameter">Parameter</h5>

Expand All @@ -60,7 +60,7 @@ <h5 id="Returns">Returns</h5>

<h5 id="Exceptions">Exceptions</h5>

<p>This method can raise a <a href="/en-US/docs/DOM/File_API/File_System_API/FileException">FileException</a> with the following codes:</p>
<p>This method can raise a <a href="/en-US/docs/Web/API/FileException">FileException</a> with the following codes:</p>

<table class="standard-table">
<thead>
Expand All @@ -86,7 +86,7 @@ <h3 id="File">file()</h3>
<p>Returns a File that represents the current state of the file that this <code>FileEntry</code> represents.</p>

<pre>void file (
) raises (<a href="https://developer.mozilla.org/en/DOM/File_API/File_System_API/FileException">FileException</a>);</pre>
) raises (<a href="/en-US/docs/Web/API/FileException">FileException</a>);</pre>

<h5 id="Parameter_2">Parameter</h5>

Expand All @@ -101,7 +101,7 @@ <h5 id="Returns_2">Returns</h5>

<h5 id="Exceptions_2">Exceptions</h5>

<p>This method can raise a <a href="/en-US/docs/DOM/File_API/File_System_API/FileException">FileException</a> with the following codes:</p>
<p>This method can raise a <a href="/en-US/docs/Web/API/FileException">FileException</a> with the following codes:</p>

<table class="standard-table">
<thead>
Expand Down Expand Up @@ -130,6 +130,6 @@ <h2 id="See_also">See also</h2>

<p>Specification:{{ spec("http://dev.w3.org/2009/dap/file-system/pub/FileSystem/", "File API: Directories and System Specification", "WD") }}</p>

<p>Reference: <a href="/en-US/docs/DOM/File_API/File_System_API">File System API</a></p>
<p>Reference: <a href="/en-US/docs/Web/API/File_and_Directory_Entries_API/Introduction">File System API</a></p>

<p>Introduction: <a href="/en-US/docs/DOM/File_APIs/Filesystem/Basic_Concepts_About_the_Filesystem_API">Basic Concepts About the File System API</a></p>
<p>Introduction: <a href="/en-US/docs/Web/API/File_and_Directory_Entries_API/Introduction">Basic Concepts About the File System API</a></p>
Loading