Socket
Book a DemoInstallSign in
Socket

wait-ui

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wait-ui

Wait a bit before starting handle user interaction

1.0.4
latest
Source
npmnpm
Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

wait-ui

Wait for a certain amount quiet time before calling function execution. It is purposely slow down the response for user's interaction.

Why

It is not necessary to response that fast or this response become costly to do. Say, typeahead call to fetch suggestion only after user stop typing; Mouseover show sub menu only when users's mouse stop on a item...

API

const waitUI = require('wait-ui');

waitUI(fn, msec, scope);

Usage

// set up component
[component].onMouseover(waitUI(this.handleMouseover, 300, this))

// the very last mouseover event happen 300ms ago
handleMouseover(event) {
  // this is this
  ...
}

Keywords

wait for

FAQs

Package last updated on 30 Sep 2018

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.