Skip to content

thunderrun/busy-wait-cursor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BUSY-WAIT-CURSOR

Display wait cursor and disable user interaction when broswer is busy

Install

npm i busy-wait-cursor

Usage

import Busy from "busy-wait-cursor";

Busy.wait().then(done => {
  // do something
  done();
});

// or
(async () => {
  await Busy.wait();
  await new Promise(resolve => {
    setTimeout(function() {
      resolve("done");
    }, 5000);
  });
  Busy.done();
})();

Known Issues

Cursor won't change without moving if dev tools is open

About

display wait cursor when browser is busy

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published