Add CefServer API for handling HTTP/WebSocket requests (issue #2278)

This commit is contained in:
Marshall Greenblatt
2017-11-09 14:00:47 -05:00
parent bfdc2655ad
commit 89a1f2b372
46 changed files with 5041 additions and 71 deletions

View File

@@ -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>