# Function: crossOrigin()

> **crossOrigin**(`element`, `url`, `crossorigin?`): `void`

**`Advanced`**

Set cross origin based detecting the url and the crossorigin

## Parameters

### element

Element to apply crossOrigin

[`ImageLike`](environment.ImageLike.html.md) | [`HTMLVideoElement`](https://developer.mozilla.org/docs/Web/API/HTMLVideoElement)

### url

`string`

URL to check

### crossorigin?

Cross origin value to use

`string` | `boolean`

## Returns

`void`
