mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Add CefServer API for handling HTTP/WebSocket requests (issue #2278)
This commit is contained in:
@@ -1,7 +1,20 @@
|
||||
<html>
|
||||
<body bgcolor="white">
|
||||
<head>
|
||||
<script language="JavaScript">
|
||||
|
||||
function setup() {
|
||||
if (location.hostname == 'tests' || location.hostname == 'localhost')
|
||||
return;
|
||||
|
||||
alert('This page can only be run from tests or localhost');
|
||||
|
||||
// Disable all elements.
|
||||
var elements = document.getElementById("form").elements;
|
||||
for (var i = 0, element; element = elements[i++]; ) {
|
||||
element.disabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Send a query to the browser process.
|
||||
function execURLRequest() {
|
||||
document.getElementById('ta').value = 'Request pending...';
|
||||
@@ -18,7 +31,9 @@ function execURLRequest() {
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<form>
|
||||
</head>
|
||||
<body bgcolor="white" onload="setup()">
|
||||
<form id="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>
|
||||
|
Reference in New Issue
Block a user