Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

six-auto-refresh

Package Overview
Dependencies
Maintainers
2
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

six-auto-refresh

A component that provides auto-refresh support to widgets

  • 1.0.5
  • latest
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

AutoRefresh component

Usage

NPM

# npm install six-auto-refresh
import AutoRefresh from 'six-auto-refresh'

// initialize with a session from SDK
let manager = AutoRefresh(session,
  {
    // refresh data every 10s
    interval: 10,
    // stop auto-refresh after 10min
    timeout: 10*60,
    // stop auto-refresh after 3min non-activity
    idleTimeout: 3*60,
    // callback that should return true when auto-refresh is enabled
    enabled: function() { return true },
    // callback called when auto-refresh is enabled/disabled
    onStateChange: function (isEnabled) { return }
})

// pause auto-refresh
manager.stop()

// restart auto-refresh after pause or timeout
manager.restart()

CDN

<script type="text/javascript" src="https://cdn.six.se/js/six-auto-refresh/0/six-auto-refresh.min.js" />

// initialize with session from SDK
Six.Components.AutoRefresh(session,
  {
    // refresh data every 10s
    interval: 10,
    // stop auto-refresh after 10min
    timeout: 10*60,
    // stop auto-refresh after 3min non-activity
    idleTimeout: 3*60,
    // callback that should return true when auto-refresh is enabled
    enabled: function() { return true },
    // callback called when auto-refresh is enabled/disabled
    onStateChange: function (isEnabled) { return }  
  })

FAQs

Package last updated on 08 Sep 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc