Reputation: 1724
I am trying to do some angular code analysis. In that way I need to get a list of all the declared modules in the webpage.
I could not find how to do it with the angular API (I believe that's not possible) but I stumbled on this. Using the AST to get modules looks interesting and promising. I could use Acorn or Esprima but I was wondering if chrome had an API to get the AST of current tab. (Possible with firefox)
EDITS:
Here is an example from wikipedia:
Upvotes: 2
Views: 689
Reputation: 77541
No, Chrome's V8 does not expose any internals as part of Extension APIs, or, for that reason, remote debugger protocol.
What you see in Dev Tools is about the limit of what is exposed.
You'll need to re-parse it yourself or use a modified version of Chromium that exposes the information you need.
Upvotes: 3