HasIntegrity
API reference › HTML Attribute › HasIntegrity
Used by 2 types
Provides an immutable API for the integrity attribute.
See also: https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/integrity, https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity.
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
integrity() | Sets the integrity attribute. | HasIntegrity |
Method details
Section titled “Method details”integrity()
Section titled “integrity() ”public function integrity(string|Stringable|UnitEnum|null $value): staticSets the integrity attribute.
Provides the Subresource Integrity hash for the resource.
Parameters
| Parameter | Type | Description |
|---|---|---|
$value | string|Stringable|UnitEnum| | Integrity metadata, or null to remove the attribute. |
Returns
static: New instance with the updated integrity attribute.