Interface IAutofill
Defines commands and events for Autofill.
[Experimental("BIDICDP001")]
public interface IAutofill
Properties
AddressFormFilled
Emitted when an address form is filled.
IEventSource<AddressFormFilledEventArgs> AddressFormFilled { get; }
Property Value
- IEventSource<AddressFormFilledEventArgs>
Remarks
Event args (AddressFormFilledEventArgs):
- FilledFields - 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.
Methods
DisableAsync(string?, CancellationToken)
Disables autofill domain notifications.
Task<DisableResult> DisableAsync(string? session = null, CancellationToken cancellationToken = default)
Parameters
sessionstringOptional CDP session override.
cancellationTokenCancellationTokenA token to cancel the asynchronous operation.
Returns
- Task<DisableResult>
A task representing the asynchronous operation, containing a DisableResult.
EnableAsync(string?, CancellationToken)
Enables autofill domain notifications.
Task<EnableResult> EnableAsync(string? session = null, CancellationToken cancellationToken = default)
Parameters
sessionstringOptional CDP session override.
cancellationTokenCancellationTokenA token to cancel the asynchronous operation.
Returns
- Task<EnableResult>
A task representing the asynchronous operation, containing a EnableResult.
SetAddressesAsync(ImmutableArray<Address>, string?, CancellationToken)
Set addresses so that developers can verify their forms implementation.
Task<SetAddressesResult> SetAddressesAsync(ImmutableArray<Address> addresses, string? session = null, CancellationToken cancellationToken = default)
Parameters
addressesImmutableArray<Address>sessionstringOptional CDP session override.
cancellationTokenCancellationTokenA token to cancel the asynchronous operation.
Returns
- Task<SetAddressesResult>
A task representing the asynchronous operation, containing a SetAddressesResult.
TriggerAsync(BackendNodeId, FrameId?, CreditCard?, Address?, string?, CancellationToken)
Trigger autofill on a form identified by the fieldId. If the field and related form cannot be autofilled, returns an error.
Task<TriggerResult> TriggerAsync(BackendNodeId fieldId, FrameId? frameId = null, CreditCard? card = null, Address? address = null, string? session = null, CancellationToken cancellationToken = default)
Parameters
fieldIdBackendNodeIdIdentifies a field that serves as an anchor for autofill.
frameIdFrameIdIdentifies the frame that field belongs to.
cardCreditCardCredit card information to fill out the form. Credit card data is not saved. Mutually exclusive with address.
addressAddressAddress to fill out the form. Address data is not saved. Mutually exclusive with card.
sessionstringOptional CDP session override.
cancellationTokenCancellationTokenA token to cancel the asynchronous operation.
Returns
- Task<TriggerResult>
A task representing the asynchronous operation, containing a TriggerResult.