2 <body onload=
"runTest();">
5 <junk id=
"test1" style=
"display: -webkit-box; visibility: collapse;">
6 <iframe>a
</iframe><junk style=
"display: table-row-group;">a
</junk>
8 <div>a
</div><junk></junk>
9 <div id=
"test2" style=
"display: table-cell;"></div>
11 <script type=
"text/javascript">
12 function reference(domNode
)
14 this.domNode
= domNode
;
17 function walk(arr
, currentPrefix
, index
, domNode
)
21 newPrefix
= currentPrefix
+ "_" + index
;
22 walk(arr
, currentPrefix
, index
+ 1, domNode
.nextSibling
);
23 walk(arr
, newPrefix
, 0, domNode
.firstChild
);
24 arr
[newPrefix
] = new reference(domNode
);
29 var arr
= new Array();
30 walk(arr
, "", 0, document
.body
);
32 arr
[key
].domNode
.parentNode
.removeChild(arr
[key
].domNode
);
34 document
.body
.offsetTop
;
40 var test1
= document
.getElementById('test1');
41 test1
.parentNode
.removeChild(test1
);
42 var test2
= document
.getElementById('test2');
43 test2
.appendChild(test1
);