');");
    s.appendChild(text);
    await checkMessage(t, _ => container.appendChild(s));
  }, "Regression test: Bypass via appendChild into off-document script element.");

  // Variant: Create a <script> element and insert it into the document. Then
  // create a text node and insert it into the live <script> element.
  promise_test(async t => {
    // Setup: Create a <script> element, insert it into the doc, and then create
    // and insert text via a text node.
    let s = createScriptElement();
    co