Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- Manifest: dom/base/test/mochitest.toml
<!DOCTYPE HTML>
<html>
<!--
-->
<head>
<script src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
</head>
<body>
<p id="display"></p>
<div id="content" style="display: none">
<div id="divElement">
<span>Subelement1</span>
<span>Subelement2</span>
<span>Subelement3</span>
</div>
</div>
<pre id="test">
<script class="testbody" type="text/javascript">
var x = document.getElementById('divElement');
isOK = false;
try {
x.getElementsByTagName('span');
isOK = true;
} catch (ex) {
isOK = false;
}
ok(isOK, "getElementsByTagName() doesn't cause exception");
</script>
</pre>
</body>
</html>