From 4a2bc22484a615bf318ed7e549c6fd0ba0764cda Mon Sep 17 00:00:00 2001
From: Domenic Denicola
These events are also not fired when the browser changes the values of form + controls as part of state restoration during + navigation.
+ @@ -68811,9 +68815,10 @@ customElements.define("x-foo", class extends HTMLElement { argument.When user agent updates a form-associated custom element's value on behalf of
- a user, its formStateRestoreCallback
is called, given the new value and a
- string indicating a reason, "restore
" or "autocomplete
", as arguments.
formStateRestoreCallback
is called, given the new value and a string indicating
+ a reason, "autocomplete
" or "restore
", as
+ arguments.
We call these reactions collectively custom @@ -69298,17 +69303,18 @@ dictionary ValidityStateFlags { agent.
When the user agent believes it is a good idea to restore a form-associated custom
- element's state, for example after navigation or
- restarting the user agent, they may enqueue a custom element callback reaction with
- that element, callback name "formStateRestoreCallback
", and an argument
- list containing the state to be restored, and "restore"
.
formStateRestoreCallback
", an argument list containing the state to be
+ restored, and "restore
".
If the user agent has a form-filling assist feature, then when the feature is invoked,
it may enqueue a custom element callback reaction with
a form-associated custom element, callback name
- "formStateRestoreCallback
", and an argument list containing the state value
+ "formStateRestoreCallback
", an argument list containing the state value
determined by history of state value and some heuristics, and
- "autocomplete"
.
autocomplete
".
In general, the state is information specified by a user, and the submission value is a value after canonicalization @@ -88837,6 +88843,11 @@ new PaymentRequest(…); // Allowed to use data-x="attr-input-type-text">Text state or the Search state, if the persisted state includes the directionality of user input in such controls.
+ +Restoring the value of form controls as part of this process does not fire any
+ input
or change
events, but
+ can trigger the formStateRestoreCallback
of form-associated custom elements.