<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.testRunner)
        testRunner.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>