CEF4Delphi/bin/test.js
Salvador Diaz Fau 1299a6f596 Added ConsoleBrowser2 and WebpageSnapshot demos
- Split the Lazarus demos directory into "Lazarus_Windows" and "Lazarus_Linux".
- Added OSRExternalPumpBrowser and TinyBrowser2 demos to "Lazarus_Linux".
- Set TBufferPanel.GetScreenScale as virtual.
- Added DevTools to the SchemeRegistrationBrowser demo.
- Modified the SchemeRegistrationBrowser demo to receive XMLHttpRequest requests from JavaScript.
2020-12-13 18:36:10 +01:00

16 lines
383 B
JavaScript

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();
}