Use this method to set up page elements that have been updated by ajax forms, links or refresh elements.
Use this method to set up page elements that have been updated by ajax forms, links or refresh elements. It is important that you keep this method idempotent and performant as it may be invoked frequently if you have refresh elements set to refresh on a schedule.
The element being set up.
Use this method to set up the body of the page by attaching event handlers, progressively enhancing elements, etc.
Use this method to set up the body of the page by attaching event handlers, progressively enhancing elements, etc. This method is invoked by Progressive exactly once per page load.
The body element.
Determines whether a virtual dom patch should be applied to a refresh element or not.
Determines whether a virtual dom patch should be applied to a refresh element or not.
The refresh element.
True if the virtual dom patch should be applied, false otherwise.
Code to execute after an ajax form has been submitted.
Code to execute after an ajax form has been submitted. The default implementation focuses the first invalid form element (if any).
The form.
Code to execute before an ajax form has been submitted.
Code to execute before an ajax form has been submitted. The default implementation resets any invalid form elements.
The form.
True if the form should be submitted, false otherwise.
A y-axis offset (in pixels) to use when scrolling an element into view.
A y-axis offset (in pixels) to use when scrolling an element into view. Useful when there are elements fixed at the top of the page, such as navbars or headers, that would otherwise obscure the element being scrolled into view.
The offset in pixels to apply when scrolling an element into view.
Extension points to customize the behaviour of Progressive. You'll need to provide an implementation of this trait when initializing Progressive.