Package com.cefrium
Interface CefriumBrowser.QueryHandler
- Enclosing class:
CefriumBrowser
public static interface CefriumBrowser.QueryHandler
Handles JavaScript
window.cefriumQuery({request, onSuccess,
onFailure}) calls from page content (the JS ↔ native bridge).
Step 4 supports synchronous responses: call callback.success()
or callback.failure() from within onQuery(long, java.lang.String, java.lang.String, com.cefrium.CefriumBrowser.QueryCallback). Returning
false (or never responding) fails the query with code -1.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanonQuery(long queryId, String request, String origin, CefriumBrowser.QueryCallback callback)
-
Method Details
-
onQuery
- Parameters:
queryId- Opaque id (also valid for async responses).request- The JS-provided request payload.origin- URL of the frame that called window.cefriumQuery. Gate on this to reject untrusted pages/iframes (security).callback- Resolve the query via success/failure.- Returns:
- true if this handler took the query.
-