Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
mohamedkhallouq
GitHub Repository: mohamedkhallouq/content
Path: blob/main/files/en-us/web/svg/attribute/crossorigin/index.md
6552 views
---
title: 'SVG attribute: crossorigin' slug: Web/SVG/Attribute/crossorigin page-type: svg-attribute tags: - Advanced - Attribute - CORS - SVG - NeedsContent - Reference - Security browser-compat: api.SVGImageElement.crossOrigin
---

{{SVGRef}}

The crossorigin attribute, valid on the {{ SVGElement("image") }} element, provides support for CORS, defining how the element handles crossorigin requests, thereby enabling the configuration of the CORS requests for the element's fetched data. It is a CORS settings attribute.

This table shows all possible keywords and their meaning:

Keyword Description
anonymous CORS requests for this element will have the credentials flag set to 'same-origin'.
use-credentials CORS requests for this element will have the credentials flag set to 'include'.
"" Setting the attribute name to an empty value, like crossorigin or crossorigin="", is the same as anonymous.

It follows the same processing rules as the HTML attribute {{htmlattrxref("crossorigin")}}.

Specifications

{{Specifications}}

Browser compatibility

{{Compat}}

Note: The above compatibility table is broken and needs fixing.

See also