Skip to content

captureCalls('document.getElementById') to show a stack trace for document.getElementById on its every call

Notifications You must be signed in to change notification settings

NV/captureCalls.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

captureCalls.js

Demo

Usage

There are two ways to use captureCalls.js: a Chrome extension or a standalone script.

Once installed, it runs on all web sites and defines captureCalls function globally, so it can be used not only in DevTools console but in all JavaScripts as well.

Standalone script

Download captureCalls.js and include it into your web page <script src="captureCalls.js"></script>.

It’s generally a good idea to include captureCalls.js only for a developer environment and keep it out of production.

Options

captureCalls.stacktrace
true: include stack traces in the output

captureCalls.logFileNames
true: show URLs with line numbers, e.g. http://nv.github.io/captureCalls.js/demo/demo.js:7

captureCalls.logDetails
false: show an object with details, e.g. {this: window, function: function() {[native]}}

TODO

  • Write on how captureCalls is superior to Chrome DevTools monitor function.

About

captureCalls('document.getElementById') to show a stack trace for document.getElementById on its every call

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published