Please add official support for loading a bundled local web application in the native WebView.
For example:
webView.loadLocal("web/index.html");
or:
webView.url = "local://web/index.html";
The web files would be packaged inside the Android APK / iOS app:
web/
├── index.html
└── assets/
├── app.js
├── app.css
├── images/
└── fonts/
It should support:
HTML / CSS / JavaScript
ES modules
WebAssembly
SPA routing
Relative assets
IndexedDB / localStorage
Completely offline operation
Existing JavaScript bridge
This would make it much easier to embed modern web applications into Cocos native applications without requiring an external server.
Cocos already provides native WebView support and native extension APIs, so this could be exposed as an official local-content loading feature.
Please add official support for loading a bundled local web application in the native WebView.
For example:
webView.loadLocal("web/index.html");
or:
webView.url = "local://web/index.html";
The web files would be packaged inside the Android APK / iOS app:
web/
├── index.html
└── assets/
├── app.js
├── app.css
├── images/
└── fonts/
It should support:
HTML / CSS / JavaScript
ES modules
WebAssembly
SPA routing
Relative assets
IndexedDB / localStorage
Completely offline operation
Existing JavaScript bridge
This would make it much easier to embed modern web applications into Cocos native applications without requiring an external server.
Cocos already provides native WebView support and native extension APIs, so this could be exposed as an official local-content loading feature.