3 ms·
I love this. Will probably add a bookmarklet or something to load it and use it when debugging. My only question is how it works with prototyped or nested fun
by Dru89 13y ago
I love this. Will probably add a bookmarklet or something to load it and use it when debugging.
My only question is how it works with prototyped or nested functions, such as the `hide` method that you mentioned. Would you just call Tracing.trace('$.fn.hide', 'Object.static_method', 'Object.prototype.object_method') for example to get access to those particular methods?
- ebobby 13y agoYes, exactly. So far it can only access functions that it can traverse directly by name when passed the name as a string as you suggested. Local functions as in nested inside another function, or directly assigned to a local variable, or passed as a function argument the lib cannot hook into because there is no way I can address them since I am not in your lexical context and if you pass them to the library you pass only the reference to the function, not a reference to the reference. In that case I guess it may be possible for the library to hook your code into them only if you pass them to the library and the library returns a new function for you but that is a little too cumbersome.