Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to access the event queue in JavaScript?

I've some articles on how the event loop works. My question is whether there's some way I can access the current queue of functions that are scheduled to be executed. Just for fun.

like image 295
Micro Optimizer Avatar asked Nov 09 '22 06:11

Micro Optimizer


1 Answers

Not normally, it's all behind the scenes.

The only way you could do it would be to overload the functions like addEventListener and dispatch so you can add in some of your own logic and then watch them, but that would be a lot of work "just for fun".

like image 73
samanime Avatar answered Nov 14 '22 22:11

samanime