From JS

Find the source of every HTML character in a JavaScript app.

FromJS 2 is coming up!

FromJS observes JavaScript data flow at runtime, and helps you analyze it.
The first version of FromJS was too flaky to be useful in practice. FromJS 2 will actually work!

What is FromJS?

FromJS is a developer tool that helps you understand how a JavaScript app works.

You can select an HTML element to view where its content came from, or call fromJSInspect in your code. The screenshot shows that the string "Hello" originally came from localStorage.

Get FromJS

Install from NPM:

sudo npm install -g @fromjs/cli --unsafe-perm

Then run fromjs from the command line. This will open a new Chrome instance. Collected data will be stored in ./fromjs-session.

Read the readme to learn more.

Does it work on all websites?

It works reasonably well. Trello is inspectable, and all Lodash test cases pass. Large apps will require a long time to load (1-20 minutes), and be slow to interact with.

There are two types of "not working". The first is when the inspected page fails to load, or takes so long to load that inspecting is not practical.
The second is not being able to find the origin of the inspected value.

Some features don't have much support, e.g. using promises currently means losing origin data (except for some special logic for `fetch` calls). In general things don't work unless support has been added explicitly.

Fork me on GitHub