Ticket #7553 (closed bug: duplicate)
IE7 <object> element .getElementsByTagName behaves as if at document level, with workaround
|Reported by:||http://psmay.com/||Owned by:|
(A workaround can be implemented in jQuery to smooth this bug over, but it is not actually a defect with the library itself.)
At least IE7 has a bug with the combination of an <object/> element and the .getElementsByTagName() method. If one attempts to retrieve object.getElementsByTagName('param') (for example), the result is the list of all of the param elements in the entire document, not just descendants of that object element. This behavior is propagated by jQuery through e.g. $('object[name=...]').find('param') and $('object[name=...]').find('param[name=...]').
http://jsfiddle.net/kqaqh/6/ displays the bug in at least IE7 and works correctly in at least Firefox 3.6. It is really only visible in situations with multiple object elements. Two workarounds are also displayed as assigned to cparams and aparams. aparams is theoretically more complete as a solution, but cparams should cover many realistic cases. The library would have to special-case the find method for <object/> and any other affected elements, if any, to use the alternate approach.