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.
frameId
Optional
Identifies the frame that field belongs to.
card
Credit card information to fill out the form. Credit card data is not saved.
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
string
address field name, for example GIVEN_NAME.
value
string
address 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
string
16-digit credit card number.
name
string
Name of the credit card owner.
expiryMonth
string
2-digit expiry month.
expiryYear
string
4-digit expiry year.
cvc
string
3-digit card verification code.
Autofill.FilledField #
Type: object
Properties
htmlType
string
The type of the field, e.g text, password etc.
id
string
the html id
name
string
the html name
value
string
the field value
autofillType
string
The 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