CEF4Delphi/bin/test.js

16 lines
383 B
JavaScript
Raw Normal View History

function myAlertFunction() {
alert('This alert dialog is declared in a local JS file.');
}
function sendCustomReq() {
var xhr = new XMLHttpRequest();
var url = 'hello://localhost/customrequest?name1=value1';
xhr.open('GET', url, true);
xhr.onreadystatechange = function() {
if(xhr.readyState == 4 && xhr.status == 200) {
alert(xhr.responseText);
}
}
xhr.send();
}