crossOrigin property
Specifies whether to use Cross-Origin Resource Sharing (CORS) when fetching an image from a site outside the webpage's domain.
This property is read/write.
![]() |
Syntax
| JavaScript |
|---|
object.crossOrigin = useCORS useCORS = object.crossOrigin |
Property values
Type: DOMString
One of the following:
| Value | Condition |
|---|---|
|
Don't use CORS to request an image from another domain. |
|
Use CORS to request an image from another domain. |
Remarks
Cross-Origin Resource Sharing (CORS) is described in the W3C Cross-Origin Resource Sharing specification.
See also
Show:
