Optional
abortAllow cancelling of in flight async request if disconnected
Readonly
contextDefer writing the results while there is interaction with the target container
Readonly
hasReadonly
hasReadonly
hasReadonly
hasOptional
iconThe related icon element to attach the spinner to
Readonly
inputA dotted path to the HTML string value to extract from the JSON response
Optional
replaceDebounced function to request a URL and then replace the DOM with the results
Optional
searchDebounced function to search results and then replace the DOM
Optional
submitDebounced function to submit the serialized form and then replace the DOM
Optional
writeA function that writes the HTML to the target
Static
blessingsStatic
defaultStatic
outletsStatic
targetsStatic
valuesElement that receives the fetch result HTML output
Static
shouldWhen disconnecting, ensure we reset any visual related state values and cancel any in-flight requests.
Toggle the visual spinner icon if available and ensure content about to be replaced is flagged as busy.
Abort any existing requests & set up new abort controller, then fetch and replace the HTML target with the new results. Cancel any in progress results request using the AbortController so that a faster response does not replace an in flight request.
Optional
urlSource: string | CustomEvent<{ url: string }> & { params?: { url?: string } }Optional
data: FormDataPerform a URL search param update based on the input's value with a comparison against the matching URL search params. Will replace the target element's content with the results of the async search request based on the query.
Search will only be performed with the URL param value is different to the input value. Cleared params will be removed from the URL if present.
clear
can be provided as Event detail or action param to override the default of 'p'.
Optional
data: CustomEvent<{ clear: string }> & { params?: { clear?: string } }Update the target element's content with the response from a request based on the input's form values serialized. Do not account for anything in the main location/URL, simply replace the content within the target element.
Static
after
Allow for an element to trigger an async query that will patch the results into a results DOM container. The controlled element can be the query input, the containing form, or a button. It supports the ability to update the URL with the query when processed or simply make a query based on a form's values.
Example: - A form that will update the results based on the form's input
Example: - A single input that will update the results & the URL
Example: - A single button that will update the results