Comment 1 for bug 402160

Revision history for this message
Gavin Panella (allenap) wrote :

The following patch to lazr-js shows more information about the error, and also makes things work again. Essentially, the error is caused when val is undefined, and it attempts to do style['height'] = undefined. I don't know why val should be undefined, nor do I know why that should really be a problem. Perhaps just doing val || null would be enough to work around this problem for now.

=== modified file 'lib/yui/3.0.0pr2/build/dom/dom.js'
--- lib/yui/3.0.0pr2/build/dom/dom.js 2008-12-15 13:29:08 +0000
+++ lib/yui/3.0.0pr2/build/dom/dom.js 2009-07-21 11:04:28 +0000
@@ -666,7 +666,12 @@
                     att = CUSTOM_STYLES[att];
                 }
             }
- style[att] = val;
+ try {
+ style[att] = val;
+ }
+ catch (error) {
+ alert('style[' + att + '] = ' + val);
+ }
         }
     },