We are loading an swt app in cefBrowser. The app will send via JS the status (e.g. initializeCompleted) when all swt stuff is loaded.
So we have to listen to the JS function
- Code: Select all
function sendCommand(method, args)
It seems the best way to handle callback could be :
- Code: Select all
function sendCommand(method, args) {
// Results in a call to the OnQuery method in binding_test.cpp
window.cefQuery({
request: method,
onSuccess: function(response) {
document.getElementById('result').value = 'Response: '+response;
},
onFailure: function(error_code, error_message) {}
});
}
and adding this snipped by manipulation response with
- Code: Select all
ResourceHandler.readResponse
Is that right or is there a better way?