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