How to bind a task in queue with an user interaction event
Opened this issue · 0 comments
onlinebizsoft commented
There are some common cases like
- A mobile menu to be initiated and used when user click on the button
- A search JS overlay need to be initiated and when user input the search, it will start interact with users immediately
I'm looking a way to optimize some UI JS for those and found this together with
https://github.com/hiroki0525/idle-task
Both are nice idea and exactly what I'm approaching. However in both cases, I can not see an interface API which allow to do these when CPU is idle while allow the initialization can be triggered immediately if users interact (and it was not initiated).
I only see a similar wrapper for Value Initialization and it does not work with queue. Do you have any idea? @philipwalton @adamsanderson @zachleat @PaulKinlan @mathiasbynens @futurist