FromJS is in currently. If you find any issues (you probably will) please report them on Github.
This is how you use it: open any web page, select an element with the DOM inspector, then view the source of the inspected data. The screenshot below shows the the todo item was loaded from localStorage:
sudo yarn global add @fromjs/cli
sudo npm install -g @fromjs/cli --unsafe-perm (Why unsafe-perm?)
fromjs - this will open a Chrome browser window
By default this will launch a web server on localhost:7000, a proxy server on port 7001, and store the collected data in
Loading pages will be slow! For large apps expect it to take several minutes. It will be faster once the page's JS files are cached. Maybe try something simple like Backbone TodoMVC to get started.
The page inspector UI
- explain dataflow concept / what the steps mean
- can select characters
- view argument list
Instead of using the DOM Inspector you can also use the global
fromJSInspect function in the inspected page.
If you control the code for the inspected page you can write something like this:
var greeting = "Hello world!" fromJSInspect(greeting)
You can also inspect DOM elements:
Node isn't currently supported, although if we can figure out how to intercept the JS before it's executed by Node it should be pretty straightforward to implement.
How it works
Read about it here.
Key libraries used:
Check out the Contributing.md file.