Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- Manifest: dom/base/test/mochitest.toml
<?xml version="1.0"?>
<!--
-->
<head>
<script src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
</head>
<body>
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=364413">Mozilla Bug 364413</a>
<p id="display"></p>
<div id="content" style="display: none">
</div>
<div id="test1" foobar:foo="foo"/>
<pre id="test">
<script class="testbody" type="text/javascript">
var test1 = document.getElementById("test1");
function mutationHandler(aEvent) {
ok(attrNode == aEvent.relatedNode);
ok(aEvent.target == attrNode.ownerElement);
}
function runTest() {
test1.removeAttributeNode(attrNode);
test1.addEventListener("DOMAttrModified", mutationHandler, true);
test1.setAttributeNodeNS(attrNode);
test1.removeEventListener("DOMAttrModified", mutationHandler, true);
SimpleTest.finish();
}
SimpleTest.waitForExplicitFinish();
SpecialPowers.pushPrefEnv({"set": [["dom.mutation_events.enabled", true]]}, runTest);
</script>
</pre>
</body>
</html>