Commit b429cd2
committed
Fix: Use configurable jsBridgeName in WasmJs and update version
This commit updates the WasmJs WebView implementation to use the `webViewJsBridge.jsBridgeName` property instead of the hardcoded "kmpJsBridge" string when identifying and processing messages from the JavaScript bridge. This allows for customization of the bridge name.
**WasmJs:**
- In `WasmJsWebView.kt` and `WebView.wasmJs.kt`, message handling logic now checks for `webViewJsBridge.jsBridgeName` in the incoming `dataString`.
- In `WebViewJsBridge.kt`, the injected JavaScript code for `postMessage` and the event listener now uses the dynamic `jsBridgeName` property for the `type` field in messages.
**Build:**
- Incremented `VERSION_NAME` to `2.0.3`.1 parent 0dbf061 commit b429cd2
4 files changed
Lines changed: 5 additions & 5 deletions
File tree
- webview/src/wasmJsMain/kotlin/com/multiplatform/webview/web
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
179 | | - | |
| 179 | + | |
180 | 180 | | |
181 | 181 | | |
182 | 182 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
314 | 314 | | |
315 | 315 | | |
316 | 316 | | |
317 | | - | |
| 317 | + | |
318 | 318 | | |
319 | 319 | | |
320 | 320 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
| 58 | + | |
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| |||
0 commit comments