mirror of
https://github.com/status-im/react-native-webview.git
synced 2026-09-02 04:31:08 +00:00
feat(events): Add isTopFrame to shouldStartLoadForRequest (#1537)
* Add isTopFrame to shouldStartLoadForRequest on iOS onLoadingStart is not raised for inner frames, but onShouldStartLoadWithRequest still is. This keeps that behavior but adds isTopFrame to onShouldStartLoadWithRequest so that apps can perform their own filtering if desired. * Update docs Co-authored-by: Jamon Holmgren <jamonholmgren@gmail.com>
This commit is contained in:
co-authored by
Jamon Holmgren
parent
621d2df72e
commit
6a9116f2d1
+2
@@ -14,6 +14,8 @@ class TopShouldStartLoadWithRequestEvent(viewId: Int, private val mData: Writabl
|
||||
|
||||
init {
|
||||
mData.putString("navigationType", "other")
|
||||
// Android does not raise shouldOverrideUrlLoading for inner frames
|
||||
mData.putBoolean("isTopFrame", true)
|
||||
}
|
||||
|
||||
override fun getEventName(): String = EVENT_NAME
|
||||
|
||||
Reference in New Issue
Block a user