问题
I need to access the (for example) Chrome Developer Tools network tab with JavaScript. I only need
1.) Source Name (column 1) and
2.) Type (column 3)
But I have absolutely no idea how to do this.
Links are very apprecciated!
Thanks in advance!
回答1:
I've made some research, but it seems like you can't do it, you can't access the devtools directly from js, but from what I have read you could use console.profile()
as follow:
console.profile()
console.profileEnd()
But it seems it does not return the value of the profile, its accessible from the devTools... not ideal...
But you could use PhantomJS or something similar, dont know if would accomplish wwat you are after...
Or check this google group discussion about the topic:
- Programmatic access to network panel entries through console / javascript
来源:https://stackoverflow.com/questions/50571529/javascript-access-network-tab-via-javascript