Re:Show HN: A library to record and intercept JavaScript at ...
by ldd on Sunday September 10, 2017 @08:20AM
(#15211906)
partial call tree recording is supported, I think. Take a look at section "28.3.2 Intercepting method calls" from the link I posted above.
More importantly, you are entirely right about ES5 support. Babel doesn't polyfill Proxies, and the google polyfill is not as powerful.
Re:Show HN: A library to record and intercept JavaScript at ...
by Schampu on Sunday September 10, 2017 @08:33AM
(#15211951)
Interesting! One of the main challenges of Iroh was to always keep track of all branches (calls, ifs, loops..) correctly. All listeners provide an indent value which represents the level of branch deepness and can be used in code flow visualizations. When your program is inside a function->loop->if and a return is inside there, then you have to manually leave if->loop until you get to according function to return on.
If you're wondering what the patched code looks like:
Input:
Output: