HasSrc
API reference › HTML Attribute › HasSrc
Used by 1 type
Provides an immutable API for the src attribute.
See also: https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/src.
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
src() | Sets the src attribute. | HasSrc |
Method details
Section titled “Method details”src()
Section titled “src() ”public function src(string|Stringable|UnitEnum|null $value): staticSets the src attribute.
Specifies the resource URL.
Parameters
| Parameter | Type | Description |
|---|---|---|
$value | string|Stringable|UnitEnum| | Resource URL, or null to remove the attribute. |
Returns
static: New instance with the updated src attribute.