blob: d8a007b7f7d5c7315282577c07bea71e0f36f891 [file] [log] [blame]
<html>
<head>
<title>DOM instanceof</title>
<script>
function print(message, color)
{
var paragraph = document.createElement("div");
paragraph.appendChild(document.createTextNode(message));
paragraph.style.fontFamily = "monospace";
if (color)
paragraph.style.color = color;
document.getElementById("console").appendChild(paragraph);
}
function test()
{
if (window.layoutTestController)
layoutTestController.dumpAsText();
if(document.getElementById("console") instanceof Element)
print("PASS", "green");
else
print("Failed", "red");
}
</script>
</head>
<body>
<p>This page tests to make sure instanceof operator for DOM nodes works properly.</p>
<p>If the test passes, you'll see a single 'PASS' message below.</p>
<hr>
<div id='console'></div>
<script>
test();
</script>
</body>
</html>