8000 GitHub - Shaiq1217/event-loop-explorer: Event Loop Explorer: visualise javascript code execution in a browser environment
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Shaiq1217/event-loop-explorer

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

89 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
< 8000 svg aria-hidden="true" focusable="false" class="octicon octicon-file color-fg-muted" viewBox="0 0 16 16" width="16" height="16" fill="currentColor" display="inline-block" overflow="visible" style="vertical-align:text-bottom">
 
 
 
 
 
 

Repository files navigation

Event Loop Explorer

license badge issues badge prs badge release badge commit activity badge

About the project

Event Loop Explorer is a tool that helps to understand how JavaScript code is executed in the browser. It visualizes the Call Stack, Web APIs, Tasks, Microtasks, and Render phase.

Screenshots:

event-loop

Demo:

Feel free to try it here: https://vault-developer.github.io/event-loop-explorer/

Known limitations & simplifications:

  • Javascript code is parsed to AST using acorn parser, and then order of events are generated. All default examples are working as expected, you can try to modify the code and see how it is working. However, not all cases are covered. Async/await, complex Promises, SetInterval, assignment operators will not work as expected.
  • Render phase is usually triggered every 16.66ms (60fps), but in this project it is simplified to just every second Event Loop circle. We are counting every circle as 360ms for simplicity, so render phase is triggered every 720ms.
  • UI is not mobile-friendly, please use desktop devices only.

Contribution:

If you want to contribute, feel free to fork this repository and create a pull request.
There are a lot of topics in the "Future Plans" section.
Have a question or idea?
Feel free to raise it in our discussions session 👍

Launch locally:

git clone git@github.com:vault-developer/event-loop-explorer.git

cd event-loop-explorer

yarn install

yarn dev

Future Plans:

Inspired by:

About

Event Loop Explorer: visualise javascript code execution in a browser environment

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 96.8%
  • JavaScript 2.5%
  • Other 0.7%
0