简体   繁体   中英

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.

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".

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM