swfobject/swfobject — Issue #6: SWFObject 2.3b: Invalid argument on line 661 in IE
Author: Cinamonas
Created: 2011-11-20 21:42:48+00:00
State: open

I get "Invalid argument" error, which occurs on line 661, character 5 in IE9. When switching browser mode, the same error occurs, so I believe it's consistent across IE. The problematic block is this one (the logging is mine):

if (ua.ie) {
if (dynamicStylesheet && typeof dynamicStylesheet.addRule != UNDEF) {
dynamicStylesheet.addRule(sel, decl);
console.log(sel); // prints "#[object HTMLDivElement]"
console.log(decl); // prints "visibility: hidden"
}
}

Possibly related: the elements I'm targeting have no `id`, so I'm passing the elements themselves, which I know is possible with SWFObject 2.3 (the reason I went with 2.3).