(Separated from bug 5432) Object elements with a name or id are accessible as special properties of the document object (document ['objectname'] or document['objectid']). To better match IE's behavior, an object element should be a document property only when it has no children other than param elements.
Created attachment 4434 [details] testcase
Created attachment 4435 [details] Approximate IE's behavior IE doesn't allow HTML comments inside the object and this patch allows them (since they're not in the DOM tree).
Comment on attachment 4435 [details] Approximate IE's behavior Looks good. I'd like to see one comment in HTMLObjectElementImpl::updateDocNamedItem() saying that the rule is "<object> elements with no children other than <param> elements and whitespace can be found by name in a document, and other <object> elements cannot" But the code looks perfect to me.
Committed. Added test as fast/js/object-by-name-or-id.html