Hi, I found a crash in the DroidScript WebView when using the HTML download attribute together with Canvas.toDataURL().
This simple code reproduces the issue:
<!DOCTYPE html>
<html>
<body>
<canvas id="canvas" width="500" height="300"></canvas>
<button onclick="downloadCanvas()">Download PNG</button>
<script>
const canvas = document.getElementById("canvas");
const ctx = canvas.getContext("2d");
ctx.fillStyle = "red";
ctx.fillRect(50, 50, 200, 100);
function downloadCanvas() {
const data = canvas.toDataURL("image/png");
const a = document.createElement("a");
a.href = data;
a.download = "canvas.png";
document.body.appendChild(a);
a.click();
document.body.removeChild(a);
}
</script>
</body>
</html>
When the button is pressed, the WebView freezes and the app is force-closed.
The same download approach is expected to work in a normal browser, so this appears to be related to the DroidScript WebView's handling of <a download> with a data URL generated by canvas.toDataURL();
4 Eylül 2026 Cuma tarihinde saat 12:11:28 UTC+3 itibarıyla Dave şunları yazdı: