4 property string url: "testdocument.html"
6 property bool readyState: false
7 property bool openedState: false
9 property bool status: false
10 property bool statusText: false
11 property bool responseText: false
12 property bool responseXML: false
14 property bool dataOK: false
16 Component.onCompleted: {
17 var x = new XMLHttpRequest;
20 if (x.readyState == XMLHttpRequest.UNSENT)
24 x.setRequestHeader("Accept-Language", "en-US");
26 if (x.readyState == XMLHttpRequest.OPENED)
32 if (error.code == DOMException.INVALID_STATE_ERR)
38 if (error.code == DOMException.INVALID_STATE_ERR)
41 responseText = (x.responseText == "");
42 responseXML = (x.responseXML == null);
45 x.onreadystatechange = function() {
46 if (x.readyState == XMLHttpRequest.DONE) {
47 dataOK = (x.responseText == "QML Rocks!\n");