DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Mercurial (3b823d058ef5)

VCS Links

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
<!DOCTYPE html>
<body>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
test(() => {
  var range = document.createRange();
  var rangeContainer = document.createElement('div');
  range.setStart(rangeContainer, 0);
  range.setEnd(rangeContainer, 0);
  var shadowRoot = document.createElement('span').attachShadow({mode: "open"});
  var h1 = shadowRoot.appendChild(document.createElement('h1'));

  range.insertNode(shadowRoot);
  assert_equals(rangeContainer.firstChild, h1);
}, 'Test if Range.prototype.insertNode() should accept ShadowRoot input.');
</script>
</body>