0
Нездешний 6 months ago in iPhone • updated by Alexander Blach (Developer) 6 months ago 2

an example of code that works in textastic 5.3.1, but gives an error in the console in the 6.3 version


<!DOCTYPE html>

<html>
<head>
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, minimal-ui">
</head>
<body>

<p>Click the button to open an output stream in a new window, add some text, then close the output stream.</p>

<button onclick="myFunction()">Try it</button>

<script>
function myFunction() {
var w = window.open();
w.document.open();
w.document.write("<h1>Hello World!</h1>");
w.document.close();
}
</script>

</body>
</html>

That's probably related to the switch from the old UIWebView to the more performant WKWebView.


Textastic currently does not support multiple windows or tabs in the web preview, so creating a new window from JavaScript does not work properly at the moment, sorry.