MooFlow Firefox Uncaught Exception Fix

by Jason on March 23, 2009

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: “0x80040111 (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.