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