martedì, settembre 13, 2005

A List Apart: Articles: JavaScript Logging

A List Apart: Articles: JavaScript Logging: "If you spend much time working with JavaScript, there will eventually come a day when you need to know the value of a variable (or an object?s field) as the execution of the script progresses, or why a script terminates unexpectedly. In simple scripts, you can accomplish this with JavaScript?s alert() function, which instructs the browser to create a dialog box with the argument set as the box?s caption. The message can be anything that helps you understand your script?s operation." Un utente affezionato di JUnit non può lasciarsi scappare una possibilità di portarsi dietro le buone abitudini anche nel browser. Purtroppo, la tecnica proposta è interessante, ma ancora lontana dalla produzione. Sicuramente però è meglio procedere così che continuare con gli alert.

Nessun commento: