blob: 0516f5fc686b6d56262e51b461fb4748f3b4fb7e [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../../resources/js-test-pre.js"></script>
</head>
<body>
<script>
description(
"This test checks an orphan text node cannot be surrounded by the range. (bug31684)"
);
var range = document.createRange();
var text = document.createTextNode('hello');
var element = document.createElement("div");
range.selectNodeContents(text);
shouldThrowErrorName("range.surroundContents(element)", 'HierarchyRequestError');
</script>
<script src="../../../resources/js-test-post.js"></script>
</body>
</html>