Initial import from the monolithic Qt.
[profile/ivi/qtdeclarative.git] / tests / auto / declarative / qdeclarativexmlhttprequest / data / getResponseHeader_args.qml
1 import QtQuick 1.0
2
3 QtObject {
4     property bool exceptionThrown: false
5
6     Component.onCompleted: {
7         var x = new XMLHttpRequest;
8
9         x.open("GET", "testdocument.html");
10         x.send();
11
12         x.onreadystatechange = function() {
13             if (x.readyState == XMLHttpRequest.DONE) {
14                 try {
15                     x.getResponseHeader();
16                 } catch (e) {
17                     if (e.code == DOMException.SYNTAX_ERR)
18                         exceptionThrown = true;
19                 }
20             }
21         }
22     }
23 }