Skip to content

Commit

Permalink
Update TiWebChromeClient.java
Browse files Browse the repository at this point in the history
add progress event
  • Loading branch information
arifje authored and sgtcoolguy committed Apr 24, 2020
1 parent fef5a70 commit 2caa8e7
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,16 @@ public void onClick(DialogInterface dialog, int which)
return true;
}

public void onProgressChanged(WebView view, int progress)
{
WebViewProxy proxy = (WebViewProxy) tiWebView.getProxy();
if (proxy != null) {
KrollDict data = new KrollDict();
data.put("progress", progress);
proxy.fireEvent("progress", data);
}
}

// This exposes onCreateWindow to JS with a similar API to Android:
// If the end-developer sets the 'onCreateWindow' property of the WebViewProxy
// to a callback function, then it gets executed when a new window is created
Expand Down

0 comments on commit 2caa8e7

Please sign in to comment.