Configures defaults for passive updates.
An array of CSS selectors that is replaced whenever a matching element is found in a response. These elements are replaced even when they were not targeted directly.
By default this contains the [up-hungry]
attribute.
The configured selectors will be used to find hungry elements in the current page.
For each matching element a target will be derived from that
specific element. E.g. when you configure up.radio.config.hungrySelectors.push('input')
,
a given input will be targeted with its derived selector (like input[name=email]
).
For this to work hungry elements must have a derivable target selector.
The default polling interval in milliseconds.
Adjusts the given polling interval before it is used.
On a good network connection this returns the given interval unchanged. On a poor connection it returns the doubled interval, causing Unpoly to poll at half as frequently.
Whether Unpoly will follow instructions to poll fragments, like the [up-poll]
attribute.
When set to 'auto'
Unpoly will skip polling updates while one of the following applies:
When set to true
, Unpoly will always allow polling.
When set to false
, Unpoly will never allow polling.
To enable polling on a case-by-case basis, you may also pass a function that accepts the polling
fragment and returns true
, false
or 'auto'
. As an alternative you may also skip a
polling update by preventing the up:fragment:poll
event.
When an update is skipped due to polling being disabled, Unpoly will try to poll again after the configured interval.