Whether autosave is active.
Autosave may be deactivated when there is an unrecoverable error, e.g. a newer revision is detected.
ReadonlycontextReadonlyhasThe debounce interval between autosave calls, in milliseconds.
ReadonlypartialsThe target element for partial HTML updates.
The current revision ID of the form being edited.
The current state of the autosave process.
This is only set when the controller is used as an indicator component, not when controlling a form.
Handles the submission of the autosave form.
Debouncible based on the interval value.
StaticblessingsStaticoutletsStatictargetsStaticvaluesStaticshouldFetches the given URL that returns the partials needed to hydrate a create view into an edit view, and put it into the partials target.
A CustomEvent containing the URL to fetch.
Applies the new debounce interval to the submit function.
Updates the indicator component's state based on events dispatched by the controller from the editor form.
Staticafter
Sends a form's data to the server for autosaving.
Can also be used for an indicator component to show the current autosave state.
Dispatches the following events.
Fires
w-autosave:save- before saving, cancelable.Fires
w-autosave:hydrate- to hydrate a create view into an edit view.Fires
w-autosave:success- on successful save and any UI updates.Fires
w-autosave:deactivated- when autosave is deactivated due to an unrecoverable error.Fires
w-autosave:error- on save error, e.g. due to validation errors.