Skip to content

Commit a8ed7cb

Browse files
author
Maura Winstanley
committed
initial feedback fixes
1 parent 5b03989 commit a8ed7cb

1 file changed

Lines changed: 15 additions & 12 deletions

File tree

specs/Autofill.md

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Background
2-
The WebView2 team has been asked for an API to allow end developers to set the autofill preferences. We are exposing two of the autofill preferences that will allow enabling and disabling general and password autofill. General autofill includes things like email addresses, shipping addresses, phone numbers, and names. Password autofill includes things like usernames and passwords for login.
2+
The WebView2 team has been asked for an API to allow end developers to set the autofill preferences. We are exposing two of the autofill preferences that will allow enabling and disabling general and password autofill. General autofill includes things like email addresses, shipping addresses, phone numbers, and names. Password autofill includes things like usernames and passwords for login. Password information is not included in the general autofill.
33

44
In this document we describe the updated API. We'd appreciate your feedback.
55

@@ -10,6 +10,9 @@ Autofill has three components
1010
* Auto-populate - Populate the corresponding form fields automatically on page load.
1111
* Suggest - When the user clicks on the form field, drop down suggestions of previously saved forms will be displayed.
1212
* Populate - When clicking on one of the suggestions, the form data will populate the respective fields.
13+
The general autofill setting and password autofill setting behave independently. Their behavior differs as well.
14+
When the password autofill setting is disabled, no new password data is saved and no Save/Update Password prompts are displayed. However, if there was password data already saved before disabling this setting, then that password information is auto-populated, suggestions are shown and clicking on one will populate the fields. When the password autofill setting is enabled, password information is auto-populated, suggestions are shown and clicking on one will populate the fields, new data is saved, and a Save/Update Password prompt is displayed. The password autofill setting default behavior is enabled.
15+
When the general autofill setting is disabled, no suggestions appear, and no new information is saved. When the general autofill setting is enabled, information is saved, suggestions appear and clicking on one will populate the form fields.
1316

1417

1518
# Examples
@@ -35,16 +38,16 @@ void SettingsComponent::ToggleGeneralAutofill() {
3538

3639
## .NET, WinRT
3740
```c#
38-
webView2Control.NavigationStarting += TogglePasswordAutofill;
41+
42+
// This demonstrates a scenario in which a button triggers TogglePasswordAutofill or
43+
// ToggleGeneralAutofill.
3944
4045
private void TogglePasswordAutofill(CoreWebView2 sender, CoreWebView2NavigationStartingEventArgs e)
4146
{
4247
var settings = webView2Control.CoreWebView2.Settings;
4348
settings.IsPasswordAutofillEnabled = !settings.IsPasswordAutofillEnabled;
4449
}
4550

46-
webView2Control.NavigationStarting += ToggleGeneralAutofill;
47-
4851
private void ToggleGeneralAutofill(CoreWebView2 sender, CoreWebView2NavigationStartingEventArgs e)
4952
{
5053
var settings = webView2Control.CoreWebView2.Settings;
@@ -60,17 +63,17 @@ See [API Details](#api-details) section below for API reference.
6063

6164
# API Details
6265
```IDL
63-
interface ICoreWebView2Settings2_2
66+
interface ICoreWebView2Settings4
6467
6568
[uuid(f051013e-4bb3-46b2-b6e4-6ee3fe4f43c2), object, pointer_default(unique)]
66-
interface ICoreWebView2Settings2_2 : ICoreWebView2Settings2 {
69+
interface ICoreWebView2Settings4 : ICoreWebView2Settings3 {
6770
/// IsPasswordAutofillEnabled controls whether autofill for password
68-
/// information is enabled. The isPasswordAutofillEnabled property behaves
69-
/// independently of the isGeneralAutofillEnabled property. When
70-
/// isPasswordAutofillEnabled is false, password information is auto-populated,
71+
/// information is enabled. The IsPasswordAutofillEnabled property behaves
72+
/// independently of the IsGeneralAutofillEnabled property. When
73+
/// IsPasswordAutofillEnabled is false, password information is auto-populated,
7174
/// suggestions are shown and clicking on one will populate the fields,
7275
/// but no new data is saved and no Save/Update Password prompts are displayed.
73-
/// When isPasswordAutofillEnabled is true, password information is auto-populated,
76+
/// When IsPasswordAutofillEnabled is true, password information is auto-populated,
7477
/// suggestions are shown and clicking on one will populate the fields, new data
7578
/// is saved, and a Save/Update Password prompt is displayed.
7679
/// The default value is `FALSE`.
@@ -80,9 +83,9 @@ interface ICoreWebView2Settings2_2 : ICoreWebView2Settings2 {
8083
8184
/// IsGeneralAutofillEnabled controls whether autofill for information
8285
/// like names, street and email addresses, phone numbers, and aribtrary input
83-
/// is enabled. This excludes password information. When isGeneralAutofillEnabled
86+
/// is enabled. This excludes password information. When IsGeneralAutofillEnabled
8487
/// is false, no suggestions appear, and no new information is saved.
85-
/// When isGeneralAutofillEnabled is true, information is saved, suggestions appear
88+
/// When IsGeneralAutofillEnabled is true, information is saved, suggestions appear
8689
/// and clicking on one will populate the form fields.
8790
/// The default value is `TRUE`.
8891
[propget] HRESULT IsGeneralAutofillEnabled([out, retval] BOOL* isGeneralAutofillEnabled);

0 commit comments

Comments
 (0)