public interface nUIWebviewCallBackExt extends nUIWebviewCallBack
Modifier and Type | Method and Description |
---|---|
java.util.Hashtable |
getHeadersForURL(java.lang.Object webview,
java.lang.String url)
This method will be called to see if any new headers should be added to the HTTP request.
|
void |
onHttpAuthRequest(java.lang.Object webview,
IHttpAuthHandler handler,
java.lang.String host,
java.lang.String realm)
The methods will be called if an HTTP authentication request was received.
|
void |
onJavaScriptCallback(java.lang.Object webview,
java.lang.String clazz,
java.lang.String method,
java.lang.String[] parameters)
This method will be called when JavaScript requests the execution of a native block of code through
the JavaScript bridge logic.
|
void |
onLoadCompleted(java.lang.Object webview,
java.lang.String url)
This method will be called if url was successful loaded.
|
void |
onLoadingError(java.lang.Object webview,
int code,
java.lang.String description)
This method will be called by occurring an error during the page loading.
|
java.lang.String |
processURL(java.lang.Object webview,
java.lang.String url)
Process a url, String returned is the url to change to, null indicates no page change.
|
processURL
java.lang.String processURL(java.lang.Object webview, java.lang.String url)
webview
- - the underlying nUIWeviewElementurl
- - the url to be loadedvoid onHttpAuthRequest(java.lang.Object webview, IHttpAuthHandler handler, java.lang.String host, java.lang.String realm)
webview
- - the underlying nUIWeviewElementhandler
- - the http handler is used to set credential or cancel requesthost
- - the authentication hostrealm
- - the authentication realmvoid onLoadingError(java.lang.Object webview, int code, java.lang.String description)
webview
- - the underlying nUIWeviewElementcode
- - the error codedescription
- - the error description.void onLoadCompleted(java.lang.Object webview, java.lang.String url)
webview
- - the underlying nUIWeviewElementurl
- - loaded urljava.util.Hashtable getHeadersForURL(java.lang.Object webview, java.lang.String url)
webview
- the web Object that the callback started in.url
- the URL that will recieve the header values.void onJavaScriptCallback(java.lang.Object webview, java.lang.String clazz, java.lang.String method, java.lang.String[] parameters)
clazz
, method
and parameters
suggest a certain pattern of usage, but
are entirely arbitrary in terms of what String values are set. The implementation of both sides of this logic
is totally up to the developer, and it is essential that security and sanity of the request is checked
before running any native code.webview
- the web Object that the callback started inclazz
- An arbitrary String.method
- An arbitrary String.parameters
- An arbitrary array of Strings.