mirror of
https://github.com/AeThex-Corporation/AeThex-OS.git
synced 2026-04-17 22:27:19 +00:00
fix(webview): try absolute file path for external script
This commit is contained in:
parent
0caf77b542
commit
0212e2ff5c
2 changed files with 28 additions and 2 deletions
26
android/app/src/main/assets/public/test_external_full.html
Normal file
26
android/app/src/main/assets/public/test_external_full.html
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
<!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 External Script Full Path</title>
|
||||
<style>
|
||||
body {
|
||||
background-color: pink; /* Start Pink, turn Cyan on success */
|
||||
color: black;
|
||||
font-size: 40px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 100vh;
|
||||
margin: 0;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div>
|
||||
<h1>TEST EXTERNAL FULL (Pink = Wait / Cyan = Success)</h1>
|
||||
</div>
|
||||
<!-- Load the external script using absolute file path -->
|
||||
<script src="file:///android_asset/public/test_script.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -71,7 +71,7 @@ public class MainActivity extends BridgeActivity {
|
|||
webView.clearCache(true);
|
||||
webView.clearHistory();
|
||||
|
||||
// LOAD THE EXTERNAL SCRIPT TEST
|
||||
webView.loadUrl("file:///android_asset/public/test_external.html");
|
||||
// LOAD THE EXTERNAL SCRIPT TEST (FULL PATH)
|
||||
webView.loadUrl("file:///android_asset/public/test_external_full.html");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue