-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(android): ability to add listeners to the Capacitor WebView (#4405)
- Loading branch information
Showing
4 changed files
with
81 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
android/capacitor/src/main/java/com/getcapacitor/WebViewListener.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package com.getcapacitor; | ||
|
||
import android.webkit.WebView; | ||
|
||
/** | ||
* Provides callbacks associated with the {@link BridgeWebViewClient} | ||
*/ | ||
public abstract class WebViewListener { | ||
|
||
/** | ||
* Callback for page load event. | ||
* | ||
* @param webView The WebView that loaded | ||
*/ | ||
public void onPageLoaded(WebView webView) { | ||
// Override me to add behavior to the page loaded event | ||
} | ||
} |