Methods
-
<static> setupPullToRefresh(element, refreshFunc, options)
-
Setup content container for pull to refresh capability. This method adds touch listeners on the content container. The following events are fired by this method: ojpull is fired when user pulls the content container, the event contains the content element as well as the distance pulled in pixels. ojrelease is fired when user releases the content container, the event contains the content element. ojcomplete is fired when the refresh is done and the panel is completely closed. The event contains the content element.
Parameters:
Name Type Argument Description element
Element the DOM element that hosts the content to refresh refreshFunc
function() the function to invoke when refresh is triggered. It must return a Promise. options
Object <optional>
optional values that controls aspects of pull to refresh Properties
Name Type Description threshold
number the number of pixel to pull until refresh is triggered primaryText
string the primary text to display secondaryText
string the secondary text to display - Source:
- See:
-
<static> tearDownPullToRefresh(element)
-
Removes the listener that was added in setupPullToRefresh. Page authors should call tearDownPullToRefresh when the content container is no longer needed.
Parameters:
Name Type Description element
Element the DOM element that hosts the content to refresh - Source:
- See: