summaryrefslogtreecommitdiffstats
path: root/LayoutTests/fast/dom/getElementsByClassName/006.html
blob: 89be60bb8d68a8eab379809d41887462a926dfc8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<!doctype html>
<html>
 <head>
  <title>document.getElementsByClassName(): adding element with class</title>
  <script src="resources/common.js"></script>
 </head>
 <body class="a">
  <p id="r">FAIL (script did not run)</p>
  <script>
   var collection = document.getElementsByClassName("a"),
       ele = document.createElement("foo");
   ele.setAttribute("class", "a");
   document.body.appendChild(ele)
   t(collection, [document.body, ele])
  </script>
 </body>
</html>