Skip to content

Commit

Permalink
feat(android): add WryActivity::onWebViewCreate hook (#1179)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasfernog committed Mar 4, 2024
1 parent e6f0fbd commit 00bc96d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changes/wry-activity-webview-getter.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"wry": patch
---

Added `WryActivity::onWebViewCreate(android.webkit.WebView)` on Android.
3 changes: 3 additions & 0 deletions src/android/kotlin/WryActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,11 @@ import androidx.appcompat.app.AppCompatActivity
abstract class WryActivity : AppCompatActivity() {
private lateinit var mWebView: RustWebView

open fun onWebViewCreate(webView: WebView) { }

private fun setWebView(webView: RustWebView) {
mWebView = webView
onWebViewCreate(webView)
}

val version: String
Expand Down

0 comments on commit 00bc96d

Please sign in to comment.