aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativexmlhttprequest/data/open_invalid_method.qml
blob: 0f29031e4291dbcaaa45ef1b5ac6f7a3d60efb01 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import QtQuick 2.0

QtObject {
    property bool exceptionThrown: false

    Component.onCompleted: {
        var x = new XMLHttpRequest;

        try {
            x.open("BLAH", "http://www.nokia.com");
        } catch (e) {
            if (e.code == DOMException.SYNTAX_ERR)
                exceptionThrown = true;
        }
    }
}