Bug 19974

Summary: getElementsByClassName not live enough ;)
Product: WebKit Reporter: Anne van Kesteren <annevk>
Component: DOMAssignee: David Smith <catfish.man>
Severity: Normal CC: catfish.man, rik, sam, stevey
Priority: P2 Keywords: HasReduction
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
URL: http://software.hixie.ch/utilities/js/live-dom-viewer/?%3Cdiv%20class%3Dx%3E%3C%2Fdiv%3E%3Cdiv%20class%3Dx%3E%3C%2Fdiv%3E%3Cdiv%20class%3Dx%3E%3C%2Fdiv%3Ex%0D%0A%3Cscript%3E%0D%0A%20elms2%20%3D%20document.getElementsByClassName('x')%3B%20%0D%0A%20for(i%20%3D%200%3B%20i%20%3C%20elms2.length%3B%20i%2B%2B)%20%7B%0D%0A%20%20w(elms2.length)%3B%0D%0A%20%20elms2%5Bi%5D.className%20%3D%20'xx'%3B%0D%0A%20%7D%20%0D%0A%3C%2Fscript%3E
Description Flags
Easier (imo) to understand testcase
Fix andersca: review+

Description Anne van Kesteren 2008-07-10 13:26:30 PDT
1. Open the URL.
2. If under "Log:" it does not say 3, 2 the test has failed.

(The version and OS and such are all wrong, as I'm using Opera on Ubuntu at the moment...)
Comment 2 David Smith 2008-10-22 11:05:45 PDT
Created attachment 24560 [details]
Easier (imo) to understand testcase
Comment 3 David Smith 2008-10-22 13:47:28 PDT
Created attachment 24570 [details]

I'm a little worried about the performance implications of this, but not sure how the best way to test would be.
Comment 4 Anders Carlsson 2008-10-22 17:44:34 PDT
Comment on attachment 24570 [details]

Comment 5 David Smith 2008-10-22 17:50:21 PDT
Landed in r37800. As a workaround for versions that still have this bug, you can force an update by setting just about any non-class property when you set the class.
Comment 6 David Smith 2008-11-26 23:35:00 PST
*** Bug 22523 has been marked as a duplicate of this bug. ***