4 <link rel=
"help" href=
"http://dom.spec.whatwg.org/#dom-range-detach">
5 <script src=
"../../../resources/js-test.js"></script>
8 <div id=
"div" contenteditable=
"true">test
<a href=
"http://www.google.com/" id=
"testLink">link
</a></div>
10 description("Tests that Range.detach() is a no-op.");
12 function checkInvariance() {
13 shouldBe("range.startContainer", "link");
14 shouldBe("range.startOffset", "0");
15 shouldBe("range.endContainer", "link");
16 shouldBe("range.endOffset", "0");
17 shouldBeTrue("range.collapsed");
18 shouldBe("range.commonAncestorContainer", "link");
21 var range
= new Range();
22 var link
= document
.getElementById("testLink");
23 range
.setStart(link
, 0);
24 range
.setEnd(link
, 0);
26 shouldNotThrow("range.detach()");