MooFlow Firefox Uncaught Exception Fix
Posted by Jason | Posted in javascript | Posted on 23-03-2009
7
I am using MooFlow for a project at work and it is absolutely fantastic. Nothing else gives the ease of use and nice look like MooFlow. However, it kept throwing an uncaught exception in Firefox:
Error: uncaught exception: [Exception... "Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIDOMCanvasRenderingContext2D.drawImage]” nsresult: “0×80040111 (NS_ERROR_NOT_AVAILABLE)” location: “JS frame :: http://your-server/MooFlow.js :: anonymous :: line 423″ data: no]
I have figured out a simple fix for this.
In the file MooFlow.js look for the following line of code:
ctx.drawImage(i, 0, 0, arg.width, arg.height);
And change it to this:
try {
ctx.drawImage(i, 0, 0, arg.width, arg.height);
} catch(err) {}
And that will do it!
Note: this “fix” will disable refllections in the firefox browser.

