Skip to content

Instantly share code, notes, and snippets.

@hciudad
hciudad / objectAttrLogging_FF.js
Created August 8, 2012 15:55
Log object attributes using the .watch() method. This is only supported by Firefox.
// To log individual attributes
myWidget.options.watch('displayHeight', function(id, oldval, newval) {
console.log('id = %s, oldval = %s, newval = %s', id, oldval, newval);
return newval;
});
myWidget.options.watch('displayWidth', function(id, oldval, newval) {
console.log('id = %s, oldval = %s, newval = %s', id, oldval, newval);
return newval;
});