diff options
author | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:41:15 -0500 |
---|---|---|
committer | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:41:15 -0500 |
commit | 4b1a9203c547c019fc5398082ae19a3f3d4c3efe (patch) | |
tree | d4a40e13ceeb9f85479605110a76e7a4d5f3b56b /files/de/web/api/url | |
parent | 33058f2b292b3a581333bdfb21b8f671898c5060 (diff) | |
download | translated-content-4b1a9203c547c019fc5398082ae19a3f3d4c3efe.tar.gz translated-content-4b1a9203c547c019fc5398082ae19a3f3d4c3efe.tar.bz2 translated-content-4b1a9203c547c019fc5398082ae19a3f3d4c3efe.zip |
initial commit
Diffstat (limited to 'files/de/web/api/url')
-rw-r--r-- | files/de/web/api/url/createobjecturl/index.html | 139 | ||||
-rw-r--r-- | files/de/web/api/url/index.html | 222 | ||||
-rw-r--r-- | files/de/web/api/url/protocol/index.html | 61 |
3 files changed, 422 insertions, 0 deletions
diff --git a/files/de/web/api/url/createobjecturl/index.html b/files/de/web/api/url/createobjecturl/index.html new file mode 100644 index 0000000000..f3668e7f70 --- /dev/null +++ b/files/de/web/api/url/createobjecturl/index.html @@ -0,0 +1,139 @@ +--- +title: URL.createObjectURL() +slug: Web/API/URL/createObjectURL +tags: + - API + - Experimentell + - Méthode + - URL + - URL API +translation_of: Web/API/URL/createObjectURL +--- +<p>{{ApiRef("URL API")}}{{SeeCompatTable}}</p> + +<h2 id="Summary" name="Summary">Zusammenfassung</h2> + +<p>Die statische Methode <strong><code>URL.createObjectURL()</code></strong> erzeugt einen {{domxref("DOMString")}}, welcher eine URL enthält, die das übergebene Objekt repräsentiert. Die Gültigkeitsdauer der URL ist von dem Dokumentobjekt {{domxref("document")}} abhängig, in dessen Fenster sie erzeugt wurde. Die neue Objekt-URL repräsentiert das angegebene {{domxref("File")}}- bzw. {{domxref("Blob")}}-Objekt.</p> + +<h2 id="Syntax" name="Syntax">Syntax</h2> + +<pre class="syntaxbox"><em>objectURL</em> = URL.createObjectURL(<em>blob</em>); +</pre> + +<h2 id="Parameter">Parameter</h2> + +<dl> + <dt><em>blob</em></dt> +</dl> + +<dl> + <dd>Ist ein {{domxref("File")}}-Objekt oder ein {{domxref("Blob")}}-Objekt, für das eine URL generiert werden soll.</dd> +</dl> + +<ul> +</ul> + +<h2 id="Example" name="Example">Beispiele</h2> + +<p>Siehe "<a href="/en-US/docs/Using_files_from_web_applications#Example_Using_object_URLs_to_display_images" title="https://developer.mozilla.org/en/Using_files_from_web_applications#Example:_Using_object_URLs_to_display_images">Using object URLs to display images</a>".</p> + +<h2 id="Notes" name="Notes">Anmerkungen</h2> + +<p>Immer, wenn <code>createObjectURL()</code> aufgerufen wird, wird eine neue Objekt-URL erzeugt, auch wenn schon eine URL für das gleiche Objekt existiert. Jede dieser URLs muss durch einen Aufruf von {{domxref("URL.revokeObjectURL()")}} wieder freigegeben werden, sofern sie nicht mehr benötigt wird. Wenn das Dokument geschlossen wird, gibt der Browser die URLs automatisch wieder frei. Für eine optimale Performance and Speichernutzung sollten die URLs freigegeben werden, sofern sichergestellt werden kann, dass sie nicht mehr benötigt werden.</p> + +<h2 id="Specifications" name="Specifications">Spezifikationen</h2> + +<table class="standard-table"> + <tbody> + <tr> + <th scope="col">Spezifikation</th> + <th scope="col">Status</th> + <th scope="col">Kommentar</th> + </tr> + <tr> + <td>{{SpecName('File API', '#dfn-createObjectURL', 'URL')}}</td> + <td>{{Spec2('File API')}}</td> + <td>Erste Definition.</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility" name="Browser_compatibility">Browserkompatibilität</h2> + +<p>{{CompatibilityTable}}</p> + +<div id="compat-desktop"> +<table class="compat-table"> + <tbody> + <tr> + <th>Feature</th> + <th>Chrome</th> + <th>Firefox (Gecko)</th> + <th>Internet Explorer</th> + <th>Opera</th> + <th>Safari (WebKit)</th> + </tr> + <tr> + <td>Grundlegende Unterstützung</td> + <td>8 mit vorangestelltem <code>webkitURL</code> für <code>URL</code><br> + {{CompatChrome(23)}}</td> + <td>{{CompatGeckoDesktop(2)}}</td> + <td>{{CompatIE(10)}}</td> + <td>{{CompatOpera(15)}}</td> + <td>{{CompatSafari(6)}} mit vorangestelltem <code>webkitURL</code> für <code>URL</code><br> + {{CompatSafari(7)}}</td> + </tr> + <tr> + <td>In a {{ domxref("Worker", "Web Worker") }}</td> + <td>10 mit vorangestelltem <code>webkitURL</code> für <code>URL</code><br> + {{CompatChrome(23)}}</td> + <td>{{CompatGeckoDesktop(21)}}</td> + <td>{{CompatIE(11)}}</td> + <td>{{CompatOpera(15)}}</td> + <td>{{CompatSafari(6)}} mit vorangestelltem <code>webkitURL</code> für <code>URL</code><br> + {{CompatSafari(7)}}</td> + </tr> + </tbody> +</table> +</div> + +<div id="compat-mobile"> +<table class="compat-table" style="height: 57px; width: 922px;"> + <tbody> + <tr> + <th>Feature</th> + <th>Chrome for Android</th> + <th>Android</th> + <th>Firefox Mobile (Gecko)</th> + <th>IE Phone</th> + <th>Opera Mobile</th> + <th>Safari Mobile</th> + </tr> + <tr> + <td>Basic support</td> + <td>18 mit vorangestelltem <code>webkitURL</code> für <code>URL</code></td> + <td>4.0 mit vorangestelltem <code>webkitURL</code> für <code>URL</code></td> + <td>{{CompatGeckoMobile(14)}}</td> + <td>{{CompatUnknown}}</td> + <td>{{CompatOpera(15)}} mit vorangestelltem <code>webkitURL</code> für <code>URL</code></td> + <td>6.0 mit vorangestelltem <code>webkitURL</code> für <code>URL</code></td> + </tr> + <tr> + <td>In einem {{ domxref("Worker", "Web Worker") }}</td> + <td>18 mit vorangestelltem <code>webkitURL</code> für <code>URL</code></td> + <td>{{CompatVersionUnknown}} mit vorangestelltem <code>webkitURL</code> für <code>URL</code></td> + <td>{{CompatGeckoMobile(14)}}</td> + <td>{{CompatUnknown}}</td> + <td>{{CompatOpera(15)}} mit vorangestelltem <code>webkitURL</code> für <code>URL</code></td> + <td>6.0 mit vorangestelltem <code>webkitURL</code> für <code>URL</code></td> + </tr> + </tbody> +</table> +</div> + +<h2 id="See_also" name="See_also">Siehe auch</h2> + +<ul> + <li>{{domxref("URL.revokeObjectURL()")}}</li> + <li><a href="/en-US/docs/Using_files_from_web_applications" title="Using files from web applications">Using files from web applications</a></li> +</ul> diff --git a/files/de/web/api/url/index.html b/files/de/web/api/url/index.html new file mode 100644 index 0000000000..6f1bb53686 --- /dev/null +++ b/files/de/web/api/url/index.html @@ -0,0 +1,222 @@ +--- +title: URL +slug: Web/API/URL +tags: + - API + - Experimental + - NeedsTranslation + - TopicStub + - URL API +translation_of: Web/API/URL +--- +<div>{{ApiRef("URL API")}} {{SeeCompatTable}}</div> + +<p>The <strong><code>URL</code></strong><strong> </strong>interface represent an object providing static methods used for creating object URLs.</p> + +<p>When using a user agent where no constructor has been implemented yet, it is possible to access such an object using the {{domxref("Window.URL")}} properties (prefixed with Webkit-based browser as <code>Window.webkitURL</code>).</p> + +<h2 id="Properties">Properties</h2> + +<p><em>Implements properties defined in {{domxref("URLUtils")}}.</em></p> + +<dl> + <dt>{{domxref("URLUtils.href")}}</dt> + <dd>Is a {{domxref("DOMString")}} containing the whole URL.</dd> + <dt>{{domxref("URLUtils.protocol")}}</dt> + <dd>Is a {{domxref("DOMString")}} containing the protocol scheme of the URL, including the final <code>':'</code>.</dd> + <dt>{{domxref("URLUtils.host")}}</dt> + <dd>Is a {{domxref("DOMString")}} containing the host, that is the <em>hostname</em>, a <code>':'</code>, and the <em>port</em> of the URL.</dd> + <dt>{{domxref("URLUtils.hostname")}}</dt> + <dd>Is a {{domxref("DOMString")}} containing the domain of the URL.</dd> + <dt>{{domxref("URLUtils.port")}}</dt> + <dd>Is a {{domxref("DOMString")}} containing the port number of the URL.</dd> + <dt>{{domxref("URLUtils.pathname")}}</dt> + <dd>Is a {{domxref("DOMString")}} containing an initial <code>'/'</code> followed by the path of the URL.</dd> + <dt>{{domxref("URLUtils.search")}}</dt> + <dd>Is a {{domxref("DOMString")}} containing a <code>'?'</code> followed by the parameters of the URL.</dd> + <dt>{{domxref("URLUtils.hash")}}</dt> + <dd>Is a {{domxref("DOMString")}} containing a <code>'#'</code> followed by the fragment identifier of the URL.</dd> + <dt>{{domxref("URLUtils.username")}}</dt> + <dd>Is a {{domxref("DOMString")}} containing the username specified before the domain name.</dd> + <dt>{{domxref("URLUtils.password")}}</dt> + <dd>Is a {{domxref("DOMString")}} containing the password specified before the domain name.</dd> + <dt>{{domxref("URLUtils.origin")}} {{readonlyInline}}</dt> + <dd>Returns a {{domxref("DOMString")}} containing the origin of the URL, that is its scheme, its domain and its port.</dd> +</dl> + +<dl> + <dt>{{domxref("URLUtils.searchParams")}}</dt> + <dd>Returns a {{domxref("URLSearchParams")}} object allowing to access the GET query arguments contained in the URL.</dd> +</dl> + +<h2 id="Constructor">Constructor</h2> + +<dl> + <dt>{{domxref("URL.URL", "URL()")}}</dt> + <dd>Creates and return a <code>URL</code> object composed from the given parameters.</dd> +</dl> + +<h2 id="Methods">Methods</h2> + +<p><em>The <code>URL</code> interface implements methods defined in {{domxref("URLUtils")}}.</em></p> + +<dl> + <dt>{{domxref("URLUtils.toString()")}}</dt> + <dd>Returns a {{domxref("DOMString")}} containing the whole URL. It is a synonym for {{domxref("URLUtils.href")}}, though it can't be used to modify the value.</dd> +</dl> + +<h2 id="Static_methods">Static methods</h2> + +<dl> + <dt>{{ domxref("URL.createObjectURL()") }}</dt> + <dd>Returns a {{domxref("DOMString")}} containing a unique blob URL, that is a URL with <code>blob:</code> as its scheme, followed by an opaque string uniquely identifying the object in the browser.</dd> + <dt>{{ domxref("URL.revokeObjectURL()") }}</dt> + <dd>Revokes an object URL previously created using {{ domxref("URL.createObjectURL()") }}.</dd> +</dl> + +<h2 id="Specifications">Specifications</h2> + +<table class="standard-table"> + <tbody> + <tr> + <th scope="col">Specification</th> + <th scope="col">Status</th> + <th scope="col">Comment</th> + </tr> + <tr> + <td>{{SpecName('File API', '#creating-revoking', 'URL')}}</td> + <td>{{Spec2('File API')}}</td> + <td>Added the static methods <code>URL.createObjectURL()</code> and <code>URL.revokeObjectURL</code><code>()</code>.</td> + </tr> + <tr> + <td>{{SpecName('URL', '#api', 'Node')}}</td> + <td>{{Spec2('URL')}}</td> + <td>Initial definition (implements <code>URLUtils</code>).</td> + </tr> + </tbody> +</table> + +<h2 id="Browser_compatibility">Browser compatibility</h2> + +<p>{{CompatibilityTable}}</p> + +<div id="compat-desktop"> +<table class="compat-table"> + <tbody> + <tr> + <th>Feature</th> + <th>Chrome</th> + <th>Firefox (Gecko)</th> + <th>Internet Explorer</th> + <th>Opera</th> + <th>Safari</th> + </tr> + <tr> + <td>Basic support</td> + <td>8.0 as <code>webkitURL</code><br> + 35</td> + <td>{{CompatGeckoDesktop("2.0")}} (non-standard name) [1]<br> + {{CompatGeckoDesktop("19.0")}}</td> + <td>10.0</td> + <td>15.0 as <code>webkitURL<br> + {{CompatVersionUnknown}}</code></td> + <td>6.0 as <code>webkitURL</code><br> + 7.0</td> + </tr> + <tr> + <td><code>URLUtils</code> properties</td> + <td>32</td> + <td>{{CompatVersionUnknown}}</td> + <td>{{CompatUnknown}}</td> + <td>19</td> + <td>{{CompatVersionUnknown}}</td> + </tr> + <tr> + <td><code>username</code>, <code>password</code>, and <code>origin</code></td> + <td>32</td> + <td>{{CompatGeckoDesktop("26.0")}}</td> + <td>{{CompatUnknown}}</td> + <td>19</td> + <td>{{CompatVersionUnknown}}</td> + </tr> + <tr> + <td><code>protocol, host, hostname, port, href</code>, <code>pathname</code>, <code>search</code>, <code>hash</code></td> + <td>32</td> + <td>{{CompatGeckoDesktop("22.0")}}</td> + <td>{{CompatUnknown}}</td> + <td>19</td> + <td>{{CompatVersionUnknown}}</td> + </tr> + <tr> + <td><code>searchParams</code></td> + <td>{{CompatNo}}</td> + <td>{{CompatGeckoDesktop("29.0")}}</td> + <td>{{CompatUnknown}}</td> + <td>19</td> + <td>{{CompatVersionUnknown}}</td> + </tr> + </tbody> +</table> +</div> + +<div id="compat-mobile"> +<table class="compat-table"> + <tbody> + <tr> + <th>Feature</th> + <th>Android</th> + <th>Firefox Mobile (Gecko)</th> + <th>IE Mobile</th> + <th>Opera Mobile</th> + <th>Safari Mobile</th> + </tr> + <tr> + <td>Basic support</td> + <td>{{CompatVersionUnknown}}as <code>webkitURL</code></td> + <td>{{CompatGeckoMobile("14.0")}}(non-standard name) [1]<br> + {{CompatGeckoMobile("19.0")}}</td> + <td>{{CompatVersionUnknown}}</td> + <td>15.0 as <code>webkitURL</code></td> + <td> + <p>6.0 as <code>webkitURL</code></p> + + <p> </p> + </td> + </tr> + <tr> + <td><code>URLUtils </code></td> + <td>{{CompatUnknown}}</td> + <td>{{CompatNo}}</td> + <td>{{CompatUnknown}}</td> + <td>{{CompatUnknown}}</td> + <td>{{CompatVersionUnknown}}</td> + </tr> + <tr> + <td><code>username</code>, <code>password</code>, <code>href</code>, and <code>origin</code></td> + <td>{{CompatUnknown}}</td> + <td>{{CompatGeckoDesktop("26.0")}}</td> + <td>{{CompatUnknown}}</td> + <td>{{CompatUnknown}}</td> + <td>{{CompatVersionUnknown}}</td> + </tr> + </tbody> +</table> +</div> + +<p>[1] From Gecko 2 (Firefox 4) to Gecko 18 included, Gecko supported this interface with the non-standard <code>nsIDOMMozURLProperty</code> internal type. As the only to access such an object was through {{domxref("window.URL")}}, in practice, this didn't make any difference.</p> + +<h2 id="Chrome_Code_-_Scope_Availability">Chrome Code - Scope Availability</h2> + +<p>To use from chrome code, JSM and Bootstrap scope, you have to import it like this:</p> + +<pre class="brush: js">Cu.importGlobalProperties(['URL']); +</pre> + +<p><code>URL</code> is available in Worker scopes.</p> + +<h2 id="See_also">See also</h2> + +<ul> + <li>Property allowing to get such an object: {{domxref("Window.URL")}}.</li> + <li><a href="/en-US/docs/Components.utils.importGlobalProperties">Components.utils.importGlobalProperties</a></li> +</ul> diff --git a/files/de/web/api/url/protocol/index.html b/files/de/web/api/url/protocol/index.html new file mode 100644 index 0000000000..08d4ad6b6f --- /dev/null +++ b/files/de/web/api/url/protocol/index.html @@ -0,0 +1,61 @@ +--- +title: URL.protocol +slug: Web/API/URL/protocol +tags: + - API + - Property + - Protocols + - Reference + - URL +translation_of: Web/API/URL/protocol +--- +<div>{{ApiRef("URL API")}}</div> + +<p>Die <code><strong>protocol </strong></code>Eigenschaft der {{domxref("URL")}} Schnittstelle ist ein {{domxref("USVString")}} der das Protokollschema der URL, einschließlich des finalen <code>':' </code>darstellt.</p> + +<p>{{AvailableInWorkers}}</p> + +<h2 id="Syntax"><code>Syntax</code></h2> + +<pre class="syntaxbox"><em>string</em> = <em>object</em>.protocol; +<em>object</em>.protocol = <em>string</em>; +</pre> + +<h3 id="Wert">Wert</h3> + +<p>Ein {{domxref("USVString")}}.</p> + +<h2 id="Beispiele"><code>Beispiele</code></h2> + +<pre class="brush: js">var url = new URL('https://developer.mozilla.org/en-US/docs/Web/API/URL/protocol'); +var result = url.protocol; // Gibt "https:" zurück. +</pre> + +<h2 id="Spezifikationen"><code>Spezifikationen</code></h2> + +<table class="standard-table"> + <tbody> + <tr> + <th scope="col">Spezifikation</th> + <th scope="col">Status</th> + <th scope="col">Kommentar</th> + </tr> + <tr> + <td>{{SpecName('URL', '#dom-url-protocol', 'protocol')}}</td> + <td>{{Spec2('URL')}}</td> + <td>Erste Definition.</td> + </tr> + </tbody> +</table> + +<h2 id="Browserkompatibilität"><code>Browserkompatibilität</code></h2> + +<div class="hidden">Die Kompatibilitätstabelle auf dieser Seite wurde automatisch aus strukturierten Daten generiert. Wenn Sie zu den Daten beitragen wollen, besuchen Sie <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> und senden Sie uns eine pull-request.</div> + +<p>{{Compat("api.URL.protocol")}}</p> + +<h2 id="Siehe_auch"><code>Siehe auch</code></h2> + +<ul> + <li>Die {{domxref("URL")}} Schnittstelle zu der es gehört.</li> +</ul> |