Make title capitalization more consistent in QML documentation.
[profile/ivi/qtdeclarative.git] / src / qml / doc / src / javascript / topic.qdoc
1 /****************************************************************************
2 **
3 ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
4 ** Contact: http://www.qt-project.org/
5 **
6 ** This file is part of the documentation of the Qt Toolkit.
7 **
8 ** $QT_BEGIN_LICENSE:FDL$
9 ** GNU Free Documentation License
10 ** Alternatively, this file may be used under the terms of the GNU Free
11 ** Documentation License version 1.3 as published by the Free Software
12 ** Foundation and appearing in the file included in the packaging of
13 ** this file.
14 **
15 ** Other Usage
16 ** Alternatively, this file may be used in accordance with the terms
17 ** and conditions contained in a signed written agreement between you
18 ** and Nokia.
19 **
20 **
21 **
22 **
23 **
24 ** $QT_END_LICENSE$
25 **
26 ****************************************************************************/
27 /*!
28 \page qtqml-javascript-topic.html
29 \title Integrating QML and JavaScript
30 \brief Description of how to use JavaScript in QML applications
31
32 The QML language uses a JSON-like syntax and allows various expressions and
33 methods to be defined as JavaScript functions.  It also allows users to import
34 JavaScript files and use the functionality those imports provide.
35
36 This allows developers and designers to leverage the knowledge they have of
37 JavaScript to quickly develop both user-interfaces and application logic.
38
39 \section1 JavaScript Expressions
40
41 QML has a deep JavaScript integration, and allows
42 \l{qtqml-syntax-objectattributes.html#signal-handlers}{signal handlers}
43 and \l{qtqml-syntax-objectattributes.html#custom-methods}{methods}
44 to be defined in JavaScript.  One of the other fundamental concepts of QML is
45 the ability to bind property values to the result of complex expressions which
46 can include properties from other objects. These
47 \l{Property Binding}{property bindings}
48 are JavaScript expressions.
49
50 See the documentation page titled
51 \l{qtqml-javascript-expressions.html}{JavaScript Expressions in QML Documents}
52 for more information about using JavaScript expressions in QML.
53
54 \section1 JavaScript Imports
55
56 A QML document may import JavaScript files.  This allows an application
57 developer to provide application logic in modular, self-contained files.
58 See the documentation page titled
59 \l{qtqml-javascript-imports.html}{Importing JavaScript Files in QML Documents}
60 for more information on how to import JavaScript files and how to use the
61 functionality they provide.
62
63 \section1 JavaScript Host Environment
64
65 The QML engine provides a JavaScript environment that has some differences to
66 the JavaScript environment provided by a web browser.  Certain limitations
67 apply to code running in the environment, and the QML engine provides various
68 objects in the root context which may be unfamiliar to JavaScript developers.
69
70 These limitations and extensions are documented in the description of the
71 \l{qtqml-javascript-hostenvironment.html}{JavaScript Host Environment} provided
72 by the QML engine.
73
74 */