Source code

Revision control

Other Tools

Test Info:

<title>Test for Bug 597784</title>
<script src="/tests/SimpleTest/SimpleTest.js"></script>
<script src="/tests/SimpleTest/EventUtils.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
<a target="_blank" href="">Mozilla Bug 597784</a>
<p id="display"></p>
<div id="content"></div>
<pre id="test">
<script type="application/javascript">
/** Test for Bug 597784 **/
addLoadEvent(function() {
document.designMode = "on";
var content = document.getElementById("content");
getSelection().collapse(content, 0);
var html = "<test:tag>test:tag</test:tag>" +
"<a href=\"\" test:attr=\"test:attr\" custom=\"value\">link</a>";
document.execCommand("insertHTML", false, html);
is(content.innerHTML, html,
"The custom tags and attributes should be inserted into the document using the insertHTML command");