fgnass/spin.js — Issue #52: IE8 and below: "invalid argument"
Author: marqsm
Created: 2012-01-03 14:05:23+00:00
State: open

I'm not sure if this is really a bug or not, as it suddenly appeared one day. The component was working fine on IE before. I re-copied the component code so it should be up to date and untouched.

I've run into a situation where IE7-IE8 (probably older ones also, haven't tested) return "invalid argument". With some testing it seems like the failure happens inside ins(parent, child1, child2)-function at

parent.insertBefore(child1, child2 || null);

when child2 has a value other than null (on IE8). When error appears, values of the parameters (outerHTML) are for
parent:

child1:

child2:

What came to mind first was is it sure the parent contains the child2? insertBefore without the second parameter works fine.