meilleur prix viagra 100mg viagra en suisse viagra rezeptfrei in spanien generico viagra cialis generika indien prix du cialis avec ordonnance vardenafil kaufen viagra livraison 48h viagra te koop kamagra te koop cialis generico paypal cialis preis deutschland vardénafil générique comparatif levitra viagra viagra vente
alternativa viagra viagra roma viagra op doktersrecept viagra o simili levitra pris cialis generique indien viagra generika unterschied viagras en ligne levitra kjøp viagra rezeptfrei wien viagra högkostnadsskydd kamagra verkoop viagra generika indien vente libre viagra espagne cialis generika forum

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