1
0
mirror of https://github.com/salvadordf/CEF4Delphi.git synced 2025-01-03 10:15:38 +02:00
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();
}