HasFetchpriority
API reference › HTML Attribute › HasFetchpriority
Used by 3 types
Provides an immutable API for the fetchpriority attribute.
See also: https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/fetchpriority.
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
fetchpriority() | Sets the fetchpriority attribute. | HasFetchpriority |
Method details
Section titled “Method details”fetchpriority()
Section titled “fetchpriority() ”public function fetchpriority(string|UnitEnum|null $value): staticSets the fetchpriority attribute.
Hints the browser about the fetch priority for the resource.
Parameters
| Parameter | Type | Description |
|---|---|---|
$value | string|UnitEnum| | Fetch priority token, or null to remove the attribute. |
Returns
static: New instance with the updated fetchpriority attribute. Fetchpriority for predefined enum values.
Throws
InvalidArgumentException: If the value is not valid.