<!doctype html>
<meta charset="utf-8">
<title>document.caretPositionFromPoint()</title>
<link rel="help" href="https://drafts.csswg.org/cssom-view-1/#dom-document-caretpositionfrompoint">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style>
  #textDiv {
    display: inline-block;
  }

  .user-select-none {
    -webkit-user-select: none;
    user-select: none;
  }
</style>
<div id="container"></div>
<script>
  test(() => {
    container.setHTMLUnsa