Skip to content

Commit cda7e70

Browse files
committed
Updated README for WasmJs support and its limitations
1 parent eece07a commit cda7e70

1 file changed

Lines changed: 15 additions & 2 deletions

File tree

README.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,15 @@ io.github.kdroidfilter.webview.*
2525
* **Desktop support with native engines**
2626
* A **Rust + UniFFI (Wry)** backend instead of KCEF / embedded Chromium
2727
* A **tiny desktop footprint** with system-provided webviews
28+
* Handling of the **WasmJs** target via **IFrame** usage
2829

2930
---
3031

3132
## Platform backends
3233

3334
**Android**: `android.webkit.WebView`
3435
**iOS**: `WKWebView`
36+
**WasmJs**: `org.w3c.dom.HTMLIFrameElement`
3537
**Desktop**: **Wry (Rust)** via **UniFFI**
3638

3739
Desktop engines:
@@ -66,7 +68,7 @@ dependencies {
6668
}
6769
```
6870

69-
Same artifact for **Android, iOS, Desktop**.
71+
Same artifact for **Android, iOS, Desktop and WasmJs**.
7072

7173
---
7274

@@ -90,6 +92,7 @@ Run the feature showcase first:
9092

9193
* **Desktop**: `./gradlew :demo:run`
9294
* **Android**: `./gradlew :demo-android:installDebug`
95+
* **WasmJs**: `./gradlew :demo-wasmJs:wasmJsBrowserDevelopmentRun`
9396
* **iOS**: open `iosApp/iosApp.xcodeproj` in Xcode and Run
9497

9598
Responsive UI:
@@ -263,15 +266,25 @@ Useful for debugging or platform-specific hooks.
263266
* `wrywebview/` → Rust core + UniFFI bindings
264267
* `wrywebview-compose/` → Compose API
265268
* `demo-shared/` → shared demo UI
266-
* `demo/`, `demo-android/`, `iosApp/` → platform launchers
269+
* `demo/`, `demo-android/`, `demo-wasmJs/`, `iosApp/` → platform launchers
267270

268271
---
269272

270273
## Limitations ⚠️
271274

272275
* RequestInterceptor does **not** intercept sub-resources
276+
277+
### Desktop
278+
273279
* Desktop UA change recreates the WebView
274280

281+
### WasmJs
282+
283+
* Navigation back and forward is not available in the IFrame.
284+
* The IFrame will work only if the target website has appropriately configured its CORS.
285+
* JS can be executed only on the same origin.
286+
* Cookies can be set only for the parent destination (when the destination of the iframe is the same as the parent destination - cookies can be set. Otherwise, they will be ignored (there is a hack for it, but it is not a clean solution then https://developer.mozilla.org/en-US/docs/Web/API/Document/cookie#security)
287+
275288
---
276289

277290

0 commit comments

Comments
 (0)