slayeroffice - web experiments gone horribly awry

01.23.2006 - What the Fox?

For a while now, people have been informing me that the Javascript Object Tree Favelet didn't work in Firefox 1.5. I've finally got 'round to investigating the problem, and it has turned out to be a strange one indeed.

There were no errors being thrown -- the thing simply wasn't working. It would render it's container element, and then the code would halt. I narrowed it down to the so_parseJS() function, and began commenting out lines one by one until I saw the code return.

The culprit? The toString() method I was applying to the objects. Any line of code with toString() applied to a window object caused the script to bail. No error, no warning, just a halt to the code. How did I fix it?

Instead of:

win[obj].toString();

I did this:

fn = win[obj] + "";

If anyone has any insight into what changed from 1.0 to 1.5 that would cause this to happen, please let me know. For those interested, the original version of the code can be seen here and the update can be seen here.

I've not tested extensively, but older versions of the browser (and Opera) seem to be ok with the fix for 1.5. Leave a comment if you see otherwise.

Didya log a bug for this? Sure seems like one to me...
Posted by Jeremy Dunck on February 15, 2006 @ 1:26 pm

Comments have been closed for this post.