Skip to content

RefreshOnWindowFocus ​

By setting options.refreshOnWindowFocus, the request will be refreshed when the browser is refocus and revisible.

Code demonstration ​

API ​

Options ​

PropertyDescriptionTypeDefault
refreshOnWindowFocusWhether to re-initiate the request when the screen refocus or revisible.boolean|Ref<boolean>false
focusTimespanRe-request interval, in millisecondsnumber| Ref<number>5000

Remark

  • options.refreshOnWindowFocus support dynamic changes.
  • options.focusTimespan support dynamic changes.
  • Listen for browser events visibilitychange and focus.

Source ​

Source · Document · Demo

Released under the MIT License.