<!DOCTYPE html> | |
<html> | |
<head> | |
<script> | |
function performTest() | |
{ | |
var selectionRange = Selection_get(); | |
var clonedElements = Range_cloneContents(selectionRange); | |
Selection_clear(); | |
DOM_deleteAllChildren(document.body); | |
for (var i = 0; i < clonedElements.length; i++) | |
DOM_appendChild(document.body,clonedElements[i]); | |
} | |
</script> | |
</head> | |
<body> | |
<ul> | |
<li>One</li> | |
[<li>Two</li>] | |
<li>Three</li> | |
</ul> | |
</body> | |
</html> |