qt6-bb10/qtdeclarative/tests/auto/qml/qqmlxmlhttprequest/data/open_arg_count.2.qml

19 lines
377 B
QML

import QtQuick 2.0
QtObject {
property bool exceptionThrown: false
Component.onCompleted: {
var x = new XMLHttpRequest;
try {
x.open("GET", "http://www.qt-project.org", true, "user", "password", "extra");
} catch (e) {
if (e.code == DOMException.SYNTAX_ERR)
exceptionThrown = true;
}
}
}