SVG-Attribut: crossorigin
Das crossorigin
-Attribut, gültig für die <image>
- und <feImage>
-Elemente, bietet Unterstützung für die Konfiguration von Cross-Origin Resource Sharing (CORS)-Anfragen für die abgerufenen Daten des Elements.
Diese Tabelle zeigt mögliche Schlüsselwörter und deren Bedeutung:
Schlüsselwort | Beschreibung |
---|---|
anonymous |
CORS-Anfragen des Clients für dieses Element werden das Credentials-Flag auf 'same-origin' gesetzt haben. |
use-credentials |
CORS-Anfragen des Clients für dieses Element werden das Credentials-Flag auf 'include' gesetzt haben. |
"" |
Das Setzen des Attributnamens auf einen leeren Wert, wie crossorigin oder crossorigin="" , entspricht anonymous . |
Es folgt denselben Verarbeitungsregeln wie das HTML-Attribut crossorigin
.
Beispiel
html
<svg width="200" height="200" xmlns="http://www.w3.org/2000/svg">
<image
href="https://example.com/mdn_logo_dark.png"
height="200"
width="200"
crossorigin="use-credentials" />
</svg>
Spezifikationen
Specification |
---|
Scalable Vector Graphics (SVG) 2 # ImageElementCrossoriginAttribute |
Browser-Kompatibilität
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
crossorigin |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- No support
- No support
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.