-
Notifications
You must be signed in to change notification settings - Fork 22.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add docs for
HTMLElement.writingSuggestions
- Loading branch information
1 parent
33f1146
commit 5d9a10b
Showing
2 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
files/en-us/web/api/htmlelement/writingsuggestions/index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
--- | ||
title: "HTMLElement: writingSuggestions property" | ||
short-title: writingSuggestions | ||
slug: Web/API/HTMLElement/writingSuggestions | ||
page-type: web-api-instance-property | ||
browser-compat: api.HTMLElement.writingSuggestions | ||
--- | ||
|
||
{{APIRef("HTML DOM")}} | ||
|
||
The **`writingSuggestions`** property of the {{domxref("HTMLElement")}} interface is a string indicating if browser-provided writing suggestions should be enabled on the element or not. | ||
|
||
It reflects the value of the [`writingsuggestions`](/en-US/docs/Web/HTML/Global_attributes/writingsuggestions) HTML global attribute. | ||
|
||
## Value | ||
|
||
An enumerated value; possible values are: | ||
|
||
- `"true"` or an empty string (`""`) | ||
- : The browser automatically shows the virtual keyboard when the user taps or focuses the element. | ||
- `"false"` | ||
- : The browser does not automatically show the virtual keyboard: showing/hiding the virtual keyboard is handled manually by the script. | ||
|
||
## Examples | ||
|
||
The following example shows how to disable writing suggestions offered by user agents via script: | ||
|
||
```js | ||
const element = document.querySelector("input"); | ||
|
||
// writing suggestions offered by user agents will be disabled by script manually on this input | ||
element.writingSuggestions = "manual"; | ||
``` | ||
|
||
## Specifications | ||
|
||
{{Specifications}} | ||
|
||
## Browser compatibility | ||
|
||
{{Compat}} | ||
|
||
## See also | ||
|
||
- [`writingsuggestions`](/en-US/docs/Web/HTML/Global_attributes/writingsuggestions) HTML global attribute |