4 https://bugzilla.mozilla.org/show_bug.cgi?id=367164
7 <title>Test for Bug
367164</title>
8 <script type=
"text/javascript" src=
"/MochiKit/MochiKit.js"></script>
9 <script type=
"text/javascript" src=
"/tests/SimpleTest/SimpleTest.js"></script>
10 <link rel=
"stylesheet" type=
"text/css" href=
"/tests/SimpleTest/test.css" />
13 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=367164">Mozilla Bug
367164</a>
15 <div id=
"content" style=
"display: none">
19 <script class=
"testbody" type=
"text/javascript">
21 /** Test for Bug
367164 **/
23 var span = document.createElement(
"span");
30 span.addEventListener(
"DOMNodeInserted", function() { ins1 = true; }, true);
31 span.addEventListener(
"DOMNodeInserted", function() { ins2 = true; }, false);
32 span.addEventListener(
"DOMNodeRemoved", function() { rem1 = true; }, true);
33 span.addEventListener(
"DOMNodeRemoved", function() { rem2 = true; }, false);
35 $(
"content").appendChild(span);
36 $(
"content").removeChild(span);
38 is(ins1, true,
"Capturing DOMNodeInserted listener");
39 is(ins2, true,
"Bubbling DOMNodeInserted listener");
40 is(rem1, true,
"Capturing DOMNodeRemoved listener");
41 is(rem2, true,
"Bubbling DOMNodeRemoved listener");