chromium/third_party/blink/web_tests/http/tests/devtools/sources/debugger/resources/load-dynamic-script.js

function loadDynamicScript()
{
    var scriptElement = document.createElement("script");
    scriptElement.textContent = "function bar() { } \nconsole.log(\"DYNAMIC <script>\");";
    document.head.appendChild(scriptElement);
}

document.write("<scrip" + "t>function foo() { } \nconsole.log(\"DYNAMIC document.write()\");</sc" + "ript>");
loadDynamicScript();