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