1// Copyright (C) 2023 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
4\page qtqml-javascript-qmlglobalobject.html
5\title QML Global Object
6\brief Description of the Qml Global Object
9The QML JavaScript host environment implements the following host objects and functions.
10They are built-in, so you can use them from any JavaScript code loaded in QML, without
14\li The \l{QmlGlobalQtObject}{Qt object}: A QML object that offers helper methods
15 and properties specific to the QML environment.
16\li \l {Qt::}{qsTr()}, \l {Qt::}{qsTranslate()}, \l {Qt::}{qsTrId()}, \l {Qt::}{qsTrNoOp()},
17 \l {Qt::}{qsTranslateNoOp()}, \l {Qt::}{qsTrIdNoOp()} functions:
18 QML functions that let you translate \l{Mark Strings for Translation}
19 {strings} and \l{Mark Translatable Data Text Strings}{string literals} in the
21\li gc() function: A QML function that manually triggers garbage collection.
22\li print() function: A QML function that prints output to the console.
23\li The \l{Console API}{console object}: Implements a subset of the
24 \l{http://getfirebug.com/wiki/index.php/Console_API}{FireBug Console API}.
25\li \l{XMLHttpRequest}, DOMException: Implements a subset of the
26 \l{http://www.w3.org/TR/XMLHttpRequest/}{W3C XMLHttpRequest specification}.
29\note You cannot use the \l {QJSEngine::}{globalObject()} function to change
30the global object of a \l QQmlEngine. For more information, see
31\l {JavaScript Environment Restrictions}.