[ htmlunit-Bugs-1233519 ] removing a tbody leaves tablerows inside accessible

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[ htmlunit-Bugs-1233519 ] removing a tbody leaves tablerows inside accessible

SourceForge.net
Bugs item #1233519, was opened at 2005-07-06 16:51
Message generated for change (Comment added) made by mguillem
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=448266&aid=1233519&group_id=47038

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: 1.6
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Kim Hoogenberg (kimhoo)
>Assigned to: Marc Guillemot (mguillem)
Summary: removing a tbody leaves tablerows inside accessible

Initial Comment:
While unittesting some advanced dynamic table code, I
mentioned some weird things going on. It took me a
while to pinpoint the situation, but I've got it. It
appeared to be reproducable using a very simple table
which I grabbed from the HTMLUnit homepage.

The problem is that after removing a tbody from a table
using removeChild, the rows inside are still accessable
throug document.getElementById(rowId), which
unfortunately isn't acceptable. This code passes in
'any' browser, but throws a TypeError in my Unittest
using HTMLUnit.

<code>

<html>
        <head>
                <title>Table sample</title>
        </head>
        <body>
            <table id="table1">
                <caption>My complex table</caption>
                <thead>
                    <tr>
                        <th>Number</th>
                        <th>Description</th>
                    </tr>
                </thead>
                <tfoot>
                    <tr>
                        <td>7</td>
                        <td></td>
                    </tr>
                </tfoot>
                <tbody id="body1">
                    <tr id="row1">
                        <td>5</td>
                        <td>Bicycle</td>
                    </tr>
                </tbody>>
                <tbody id="body2">
                    <tr id="row2">
                        <td>2</td>
                        <td>Tricycle</td>
                    </tr>
                </tbody>>
            </table>
            <script type="text/javascript" language="JavaScript">
            var table = document.getElementById('table1');
            table.removeChild(document.getElementById('body1'));
            table.removeChild(document.getElementById('body2'));
            if (document.getElementById('row1') != null) {
            throw new TypeError('row should be null by now!!');
            }
            </script>
        </body>
</html>

</code>

----------------------------------------------------------------------

>Comment By: Marc Guillemot (mguillem)
Date: 2005-07-12 16:29

Message:
Logged In: YES
user_id=402164

Now fixed in cvs.

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=448266&aid=1233519&group_id=47038


-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP,
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
_______________________________________________
HtmlUnit-develop mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/htmlunit-develop
Loading...