Pleiades / closure-library

Automatically exported from code.google.com/p/closure-library
0 stars 0 forks source link

goog.dom.getElementsByTagNameAndClass("*") returns comments in ie7, ie8 #338

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.
Create a file with:
   <div id="span-container">
    <!-- Comment -->
   </div>
2.
var container = goog.dom.getElement('span-container');
goog.dom.getElementsByTagNameAndClass('*', undefined, container) //
will return the comment in ie7 and ie8.

What is the expected output? What do you see instead?
getElementsByTagNameAndClass returns the comment. I expect it not to return the 
comment.

What version of the product are you using? On what operating system?
IE7, IE8 on winxp.

Please provide any additional information below.
This is because of a bug in ie7/ie8 where getElementsByTagName("*") returns 
comments. See http://bugs.jquery.com/ticket/2847 for more information.

Original issue reported on code.google.com by melch...@google.com on 13 Jun 2011 at 11:50

GoogleCodeExporter commented 8 years ago
Hesitant to add extra code for the case given that IE7 and 8 are losing share 
and we're sensitive to code size.

 I think we should doc the behavior in the doc string and users can filter if wanted.

Original comment by nn...@google.com on 9 May 2012 at 10:25

GoogleCodeExporter commented 8 years ago

Original comment by chrishe...@google.com on 9 May 2012 at 10:25