pa7/heatmap.js — Issue #6: use typeof instead of instanceOf
Author: crickeys
Created: 2011-11-03 20:58:13+00:00
State: open

I found that in certain scenarios on some browsers (firefox latest 7) the instanceOf for the element does NOT evalute to an Object even though the typeOf is "object". This appears to be if using the heatmap in an iframe or different window.

So this:
me.set("element", (config.element instanceof Object)?config.element:document.getElementById(config.element));

would be better as:
me.set("element", (typeof(config.element) == 'object')?config.element:document.getElementById(config.element));