HasDownload
API reference › HTML Attribute › HasDownload
Used by 1 type
Provides an immutable API for the download attribute.
See also: https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/a#download.
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
download() | Sets the download attribute. | HasDownload |
Method details
Section titled “Method details”download()
Section titled “download() ”public function download(bool|string|Stringable|UnitEnum|null $value): staticSets the download attribute.
Controls whether the linked resource is treated as a download.
Parameters
| Parameter | Type | Description |
|---|---|---|
$value | bool|Stringable|UnitEnum| | Download flag or suggested filename; use true to enable downloads without a filename, or null to remove the attribute. |
Returns
static: New instance with the updated download attribute.
See also