Autofill Domain
Defines commands and events for Autofill.
Methods
Events
Types
Methods
Autofill.setAddresses #
Set addresses so that developers can verify their forms implementation.
Parameters
addresses array[ Address ]Autofill.trigger #
Trigger autofill on a form identified by the fieldId. If the field and related form cannot be autofilled, returns an error.
Parameters
fieldId Identifies a field that serves as an anchor for autofill.
frameIdOptional
Identifies the frame that field belongs to.
cardOptional
Credit card information to fill out the form. Credit card data is not saved. Mutually exclusive with address.
addressOptional
Address to fill out the form. Address data is not saved. Mutually exclusive with card.
Events
Autofill.addressFormFilled #
Emitted when an address form is filled.
Parameters
filledFields array[ FilledField ]Information about the fields that were filled
addressUi An UI representation of the address used to fill the form. Consists of a 2D array where each child represents an address/profile line.
Types
Autofill.Address #
Type: object
Properties
fields array[ AddressField ]fields and values defining an address.
Autofill.AddressField #
Type: object
Properties
name stringaddress field name, for example GIVEN_NAME. The full list of supported field names: https://source.chromium.org/chromium/chromium/src/+/main:components/autofill/core/browser/field_types.cc;l=38
value stringaddress field value, for example Jon Doe.
Autofill.AddressFields #
A list of address fields.
Type: object
Properties
fields array[ AddressField ]Autofill.AddressUI #
Defines how an address can be displayed like in chrome://settings/addresses. Address UI is a two dimensional array, each inner array is an "address information line", and when rendered in a UI surface should be displayed as such. The following address UI for instance: [[{name: "GIVE_NAME", value: "Jon"}, {name: "FAMILY_NAME", value: "Doe"}], [{name: "CITY", value: "Munich"}, {name: "ZIP", value: "81456"}]] should allow the receiver to render: Jon Doe Munich 81456
Type: object
Properties
addressFields array[ AddressFields ]A two dimension array containing the representation of values from an address profile.
Autofill.CreditCard #
Type: object
Properties
number string16-digit credit card number.
name stringName of the credit card owner.
expiryMonth string2-digit expiry month.
expiryYear string4-digit expiry year.
cvc string3-digit card verification code.
Autofill.FilledField #
Type: object
Properties
htmlType stringThe type of the field, e.g text, password etc.
id stringthe html id
name stringthe html name
value stringthe field value
autofillType stringThe actual field type, e.g FAMILY_NAME
fillingStrategy The filling strategy
frameId The frame the field belongs to
fieldId The form field's DOM node
Autofill.FillingStrategy #
Specified whether a filled field was done so by using the html autocomplete attribute or autofill heuristics.
Type: string
Allowed values: autocompleteAttribute, autofillInferred