HasReferrerpolicy
API reference › HTML Attribute › HasReferrerpolicy
Used by 3 types
Provides an immutable API for the referrerpolicy attribute.
See also: https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/referrerpolicy.
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
referrerpolicy() | Sets the referrerpolicy attribute. | HasReferrerpolicy |
Method details
Section titled “Method details”referrerpolicy()
Section titled “referrerpolicy() ”public function referrerpolicy(string|Stringable|UnitEnum|null $value): staticSets the referrerpolicy attribute.
Controls how much referrer information is sent with requests.
Parameters
| Parameter | Type | Description |
|---|---|---|
$value | string|Stringable|UnitEnum| | Referrer policy token, or null to remove the attribute. |
Returns
static: New instance with the updated referrerpolicy attribute. Referrerpolicy for predefined enum values.
Throws
InvalidArgumentException: If the value is not valid.