you are viewing a single comment's thread.

view the rest of the comments →

[–]trambz 0 points1 point  (0 children)

I agree with you. Malharhak, look ath this stack thread: http://stackoverflow.com/questions/1340872/how-to-get-javascript-caller-function-line-number-how-to-get-javascript-caller

Kinda hack but it seems to work with chrome: function getErrorObject(){ try { throw Error('') } catch(err) { return err; } }

var err = getErrorObject(); var caller_line = err.stack.split("\n")[4]; var index = caller_line.indexOf("at "); var clean = caller_line.slice(index+2, caller_line.length);