javascript 호출한 함수 확인

1. 확인 할려는 함수에서 아래와 같이 하면 확인 가능
console.log(arguments.callee.caller.name)
단점 : strict mode 에서 사용안됨

2. 호출한 메소드 전체 확인(쉬움)
일부러 에러를 만들어서 확인
try{
asdf
}catch(e){
console.log(e)
}

단점 : ie에서 사용안됨
장점 : stack trace를 확인가능


+ Recent posts