Skip to content
PHP Ecosystem
Explore

HasCrossorigin

API reference › HTML Attribute › HasCrossorigin

traitUIAwesome\Html\Attribute\HasCrossorigin
Sourcesrc/HasCrossorigin.php
Used by 5 types

Provides an immutable API for the crossorigin attribute.

See also: https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/crossorigin.

MethodDescriptionDefined by
crossorigin()Sets the crossorigin attribute.HasCrossorigin
public function crossorigin(string|UnitEnum|null $value): static

Sets the crossorigin attribute.

Controls credentialed requests for cross-origin resources.

Parameters

ParameterTypeDescription
$valuestring|UnitEnum|nullCORS mode token, or null to remove the attribute.

Returns

static: New instance with the updated crossorigin attribute. Crossorigin for predefined enum values.

Throws