Skip to content

sters/microtaskqueue-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

microtaskqueue-js

For exmaple...

const taskQueue = new MicroTaskQueue;

taskQueue.add(() => {
    const css = document.createElement('style');
    css.innerText = 'a { color:red !important; }';
    document.querySelector('head').appendChild(css);
});

taskQueue.addEachDom('div', (d) => {
    LetsDoSomethingHeavyLoadTaskForEachDivElement(d);
});

taskQueue.start();

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks