mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2024-12-08 07:41:04 +01:00
7a2ce64096
- Simplify and document the relationship between the various context object types. See browser_context.h for a description of the new relationships. - cefclient: Add `request-context-per-browser` command-line flag for testing multiple CefRequestContext instances. - cefclient: Add a CefURLRequest example. git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@2032 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
28 lines
869 B
HTML
28 lines
869 B
HTML
<html>
|
|
<body bgcolor="white">
|
|
<script language="JavaScript">
|
|
|
|
// Send a query to the browser process.
|
|
function execURLRequest() {
|
|
document.getElementById('ta').value = 'Request pending...';
|
|
|
|
// Results in a call to the OnQuery method in urlrequest_test.cpp
|
|
window.cefQuery({
|
|
request: 'URLRequestTest:' + document.getElementById("url").value,
|
|
onSuccess: function(response) {
|
|
document.getElementById('ta').value = response;
|
|
},
|
|
onFailure: function(error_code, error_message) {
|
|
document.getElementById('ta').value = 'Failed with error ' + error_message + ' (' + error_code + ')';
|
|
}
|
|
});
|
|
}
|
|
</script>
|
|
<form>
|
|
URL: <input type="text" id="url" value="http://www.google.com">
|
|
<br/><input type="button" onclick="execURLRequest();" value="Execute CefURLRequest">
|
|
<br/><textarea rows="10" cols="40" id="ta"></textarea>
|
|
</form>
|
|
</body>
|
|
</html>
|