s.get("hide-target") == "editor" ? editor : div;
  editor.value = "default value";
  div.appendChild(editor);
  document.body.appendChild(div);
  return [ hideTarget, editor ];
}

function finalize(editor) {
  editor.blur();
  editor.parentNode.remove();
  document.body.getBoundingClientRect();
}

promise_test(async () => {
  await new Promise(resolve => addEventListener("load", resolve, {once: true}));
}, "Wait for load event");

promise_test(async () => {
  const [hideTarget, editor] = init();
  try {
   