viagra achat en ligne france livraison rapide 
acheter viagra sans ordonnance 
viagrasuisse 
viagra en ligne forum 
prix-viagra-prix 
viagra achat sans ordonnance 
cialis tous les jours 
viagra pas cher france 
pharmacy viagra generic 
achat levitra france 
veritable viagra solde 
achat viagra belgique 
viagra generique canada 
viagra-fr 
medicament generique cialis 
vardenafil posologie acheter viagra andorre kamagra indien achat viagra générique sildénafil citrate prix viagra pfizer cialis vendita libera comprare viagra generico pillendienst viagra comprare kamagra oral jelly in italia comprare cialis internet consigli acheté levitra receta viagra casera levitra ou viagra viagra rezeptfrei in deutschland cialis generico venta espana

Adding Deprecation Warning in JavaScript Console

I used this quick trick today to help me clean up and refactor some javascript functions today:

if ("console" in window) console.warn('DEPRECATED function call to '+ arguments.callee +'\nCalled by:\n'+ arguments.callee.caller );

Which results in a fine deprecation warning in the console:

There is plenty of space for improvement here. Feel free to use or tamper … but please post any alternative suggestions here as a comment.

2 Responses to “Adding Deprecation Warning in JavaScript Console”

  1. Mick Staugaard Says:

    That’s a really neat little trick! Thanks for sharing Jesper.

  2. Tobias Says:

    If you want to get the console output in Internet Explorer, you can install the Companion.JS plug-in:
    http://www.my-debugbar.com/wiki/CompanionJS/HomePage