HasDraggable
API reference › HTML Attribute › Global › HasDraggable
Used by 1 type
Provides an immutable API for the draggable attribute.
See also: https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/draggable.
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
draggable() | Sets the draggable attribute. | HasDraggable |
Method details
Section titled “Method details”draggable()
Section titled “draggable() ”public function draggable(bool|string|UnitEnum|null $value): staticSets the draggable attribute.
Parameters
| Parameter | Type | Description |
|---|---|---|
$value | bool|UnitEnum| | Draggable state. Use true or false, or null to remove the attribute. |
Returns
static: New instance with the updated draggable attribute. Draggable for predefined enum values.
Throws
InvalidArgumentException: if the provided value is not valid.