-
Notifications
You must be signed in to change notification settings - Fork 22.6k
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
(#37036)
* Add docs for `HTMLElement.writingSuggestions` * fix desc * Update files/en-us/web/api/htmlelement/writingsuggestions/index.md * Apply suggestions from code review * Update files/en-us/web/api/htmlelement/writingsuggestions/index.md * Update files/en-us/web/api/htmlelement/writingsuggestions/index.md --------- Co-authored-by: Estelle Weyl <[email protected]>
- Loading branch information
1 parent
d320f20
commit 8d5d188
Showing
4 changed files
with
50 additions
and
3 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 under the scope of 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"` | ||
- : 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"); | ||
|
||
// disable user agent writing suggestions | ||
element.writingSuggestions = "false"; | ||
``` | ||
|
||
## Specifications | ||
|
||
{{Specifications}} | ||
|
||
## Browser compatibility | ||
|
||
{{Compat}} | ||
|
||
## See also | ||
|
||
- [`writingsuggestions`](/en-US/docs/Web/HTML/Global_attributes/writingsuggestions) HTML global attribute |
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
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