fix(webview): try single script block in body

This commit is contained in:
MrPiglr 2026-02-12 13:01:07 -07:00
parent 66ad61b8a0
commit 36f1e9ec8b
2 changed files with 30 additions and 1 deletions

View file

@ -0,0 +1,29 @@
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, user-scalable=no, viewport-fit=cover" />
<title>Test Script Body Single</title>
<style>
body {
background-color: yellow;
color: black;
font-size: 40px;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
}
</style>
</head>
<body>
<div>
<h1>TEST SCRIPT SINGLE LOADED (Yellow)</h1>
<p>Combining scripts into one block.</p>
</div>
<script>
console.log("Test Script Single loaded");
document.body.style.backgroundColor = "yellow";
</script>
</body>
</html>

View file

@ -70,6 +70,6 @@ public class MainActivity extends BridgeActivity {
// SWITCH TO REAL APP
// Using "file:///android_asset/public/" base path which matches the physical structure
// AND ensuring we load index.html
webView.loadUrl("file:///android_asset/public/test_script_body.html");
webView.loadUrl("file:///android_asset/public/test_body_single.html");
}
}