blob: 922147bc4e6453427bb2a323c1c70753055f549a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
import QtQuick
QtObject {
property string url
property bool dataOK: false
Component.onCompleted: {
let xhr = new XMLHttpRequest;
xhr.open("GET", url);
xhr.overrideMimeType('text/xml');
// Test to the end
xhr.onreadystatechange = function() {
if (xhr.readyState === XMLHttpRequest.DONE)
dataOK = xhr.responseXML !== null;
}
xhr.send();
}
}
|