Ich erzeuge den Webseiteninhalt mit document.writeln.
Das funktioniert auch. Nun will ich aber folgendes schreiben:
Das funktioniert nicht. Hier ist ein Screenshot mit der Fehlermeldung in der Konsole der Entwickler-Tools von Google Chrome:
Javascript:
document.writeln("<!DOCTYPE html>");
document.writeln("<html lang=\"de\">");
document.writeln("<head>");
document.writeln(" <meta charset=\"UTF-8\">");
document.writeln("</head>");
document.writeln("<body>");
document.writeln(" <p id=\"p1\">Rotieren = Eine der Pfeiltasten</p>");
document.writeln("</body>");
document.writeln("</html>");
Javascript:
document.writeln("<!DOCTYPE html>");
document.writeln("<html lang=\"de\">");
document.writeln("<head>");
document.writeln(" <meta charset=\"UTF-8\">");
document.writeln("</head>");
document.writeln("<body>");
document.writeln(" <script src=\"threeR128.js\"></script>");
document.writeln(" <script>");
document.writeln(" var scene = new THREE.Scene();");
document.writeln(" </script>");
document.writeln(" <p id=\"p1\">Rotieren = Eine der Pfeiltasten</p>");
document.writeln("</body>");
document.writeln("</html>");