4 https://bugzilla.mozilla.org/show_bug.cgi?id=1457051
8 <title>Test for Bug
1457051</title>
9 <script src=
"chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
10 <link rel=
"stylesheet" type=
"text/css" href=
"chrome://global/skin"/>
11 <link rel=
"stylesheet" type=
"text/css" href=
"chrome://mochikit/content/tests/SimpleTest/test.css"/>
12 <script type=
"application/javascript">
14 /** Test for Bug
1457051 **/
15 ok(Element.isInstance(document.documentElement),
"Basic isInstance works");
16 ok(!Element.isInstance(null),
17 "Passing null should return false without throwing");
18 ok(!Element.isInstance(
5),
"Passing 5 should return false without throwing");
19 var obj = Object.create(Element.prototype);
20 ok(obj instanceof Element,
"instanceof should walk the proto chain");
21 ok(!Element.isInstance(obj),
"isInstance should be a pure brand check");
26 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=1457051">Mozilla Bug
1457051</a>
28 <div id=
"content" style=
"display: none">