/usr/share/qt5/doc/qtqml/qtqml-javascript-topic.html is in qtdeclarative5-doc-html 5.2.1-3ubuntu15.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- topic.qdoc -->
<title>Integrating QML and JavaScript | QtQml 5.2</title>
<link rel="stylesheet" type="text/css" href="style/offline.css" />
</head>
<body>
<div class="header" id="qtdocheader">
<div class="main">
<div class="main-rounded">
<div class="navigationbar">
<ul>
<li>Qt 5.2</li>
<li><a href="qtqml-index.html">Qt QML</a></li>
<li>Integrating QML and JavaScript</li>
<li id="buildversion">
Qt 5.2.1 Reference Documentation</li>
</ul>
</div>
</div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#javascript-expressions">JavaScript Expressions</a></li>
<li class="level1"><a href="#javascript-resources">JavaScript Resources</a></li>
<li class="level1"><a href="#javascript-imports">JavaScript Imports</a></li>
<li class="level1"><a href="#javascript-host-environment">JavaScript Host Environment</a></li>
</ul>
</div>
<h1 class="title">Integrating QML and JavaScript</h1>
<span class="subtitle"></span>
<!-- $$$qtqml-javascript-topic.html-description -->
<div class="descr"> <a name="details"></a>
<p>The QML language uses a JSON-like syntax and allows various expressions and methods to be defined as JavaScript functions. It also allows users to import JavaScript files and use the functionality those imports provide.</p>
<p>This allows developers and designers to leverage the knowledge they have of JavaScript to quickly develop both user-interfaces and application logic.</p>
<a name="javascript-expressions"></a>
<h2>JavaScript Expressions</h2>
<p>QML has a deep JavaScript integration, and allows <a href="qtqml-syntax-objectattributes.html#signal-attributes">signal handlers</a> and <a href="qtqml-syntax-objectattributes.html#method-attributes">methods</a> to be defined in JavaScript. One of the other fundamental concepts of QML is the ability to bind property values to the result of complex expressions which can include properties from other objects. These <a href="qtqml-syntax-propertybinding.html">property bindings</a> are JavaScript expressions.</p>
<p>See the documentation page titled <a href="qtqml-javascript-expressions.html">JavaScript Expressions in QML Documents</a> for more information about using JavaScript expressions in QML.</p>
<a name="javascript-resources"></a>
<h2>JavaScript Resources</h2>
<p>Application logic defined in JavaScript functions may be separated into separate JavaScript files known as JavaScript resources. There are several different kinds of JavaScript resources, with different semantics.</p>
<p>See the documentation page titled <a href="qtqml-javascript-resources.html">Defining JavaScript Resources In QML</a> for more information about defining JavaScript resources for QML.</p>
<a name="javascript-imports"></a>
<h2>JavaScript Imports</h2>
<p>A QML document may import JavaScript resources, and JavaScript resources may import other JavaScript resources as well as QML modules. This allows an application developer to provide application logic in modular, self-contained files.</p>
<p>See the documentation page titled <a href="qtqml-javascript-imports.html">Importing JavaScript Resources</a> for more information on how to import JavaScript resources and how to use the functionality they provide.</p>
<a name="javascript-host-environment"></a>
<h2>JavaScript Host Environment</h2>
<p>The QML engine provides a JavaScript environment that has some differences to the JavaScript environment provided by a web browser. Certain limitations apply to code running in the environment, and the QML engine provides various objects in the root context which may be unfamiliar to JavaScript developers.</p>
<p>These limitations and extensions are documented in the description of the <a href="qtqml-javascript-hostenvironment.html">JavaScript Host Environment</a> provided by the QML engine.</p>
</div>
<!-- @@@qtqml-javascript-topic.html -->
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<p>
<acronym title="Copyright">©</acronym> 2013 Digia Plc and/or its
subsidiaries. Documentation contributions included herein are the copyrights of
their respective owners.<br> The documentation provided herein is licensed under the terms of the <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation License version 1.3</a> as published by the Free Software Foundation.<br> Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide. All other trademarks are property
of their respective owners. </p>
</div>
</body>
</html>
|