3 <title>DOM instanceof
</title>
5 function print(message
, color
)
7 var paragraph
= document
.createElement("div");
8 paragraph
.appendChild(document
.createTextNode(message
));
9 paragraph
.style
.fontFamily
= "monospace";
11 paragraph
.style
.color
= color
;
12 document
.getElementById("console").appendChild(paragraph
);
17 if (window
.testRunner
)
18 testRunner
.dumpAsText();
20 if(document
.getElementById("console") instanceof Element
)
21 print("PASS", "green");
23 print("Failed", "red");
29 <p>This page tests to make sure instanceof operator for DOM nodes works properly.
</p>
30 <p>If the test passes, you'll see a single 'PASS' message below.
</p>
33 <div id='console'
></div>