Cordova guide: Common
authorJakub Skowron <j.skowron@samsung.com>
Wed, 11 May 2016 15:48:05 +0000 (17:48 +0200)
committerLukasz Bardeli <l.bardeli@samsung.com>
Tue, 28 Jun 2016 08:16:27 +0000 (10:16 +0200)
Change-Id: I070fb5be1233cd32f94d78df68b912a5199298a7
Signed-off-by: Jakub Skowron <j.skowron@samsung.com>
org.tizen.guides/html/index.htm
org.tizen.guides/html/web/tizen/cordova/cordova_guide_w.htm
org.tizen.guides/html/web/tizen/cordova/core_w.htm [new file with mode: 0644]

index e21551b..4195b47 100644 (file)
                                <li><a href="web/tizen/ime/ime_w.htm">IME Application</a></li>
                                <li><a href="web/tizen/cordova/cordova_guide_w.htm">Cordova</a>
                                        <ul>
+                                               <li><a href="web/tizen/cordova/core_w.htm">Common Cordova</a></li>
                                                <li><a href="web/tizen/cordova/console_w.htm">Console</a></li>
                                                <li><a href="web/tizen/cordova/device_w.htm">Device</a></li>
                                                <li><a href="web/tizen/cordova/devicemotion_w.htm">Device Motion</a></li>
index 270bdb7..1b05fa8 100644 (file)
 <h1>Cordova</h1>
 
     <p>Cordova includes common features useful in creating Tizen Web applications.</p>
-  <p>The main features are:</p>
+  <p>The features are:</p>
   <ul>
     <li><a href="console_w.htm">Console</a><p>Write information to system console. It includes timing operations and object dump.</p></li>
+    <li><a href="core_w.htm">Common Cordova</a><p>Common Cordova functionality. Defines interface for success and error hanldlers.</p></li>
     <li><a href="device_w.htm">Device</a><p>Information on model, platform and installed version of Cordova.</p></li>
     <li><a href="devicemotion_w.htm">Device Motion</a><p>Access to the device's accelerometer.</p></li>
     <li><a href="dialogs_w.htm">Dialogs</a><p>Make different types of input dialog boxes and notifications to the user.</p></li>
diff --git a/org.tizen.guides/html/web/tizen/cordova/core_w.htm b/org.tizen.guides/html/web/tizen/cordova/core_w.htm
new file mode 100644 (file)
index 0000000..fd1dc64
--- /dev/null
@@ -0,0 +1,87 @@
+<!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" lang="en">
+<head>
+    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
+    <meta http-equiv="X-UA-Compatible" content="IE=9" />
+    <link rel="stylesheet" type="text/css" href="../../../css/styles.css" />
+    <link rel="stylesheet" type="text/css" href="../../../css/snippet.css" />
+    <script type="text/javascript" src="../../../scripts/snippet.js"></script>
+    <script type="text/javascript" src="../../../scripts/jquery.util.js" charset="utf-8"></script>
+    <script type="text/javascript" src="../../../scripts/common.js" charset="utf-8"></script>
+    <script type="text/javascript" src="../../../scripts/core.js" charset="utf-8"></script>
+    <script type="text/javascript" src="../../../scripts/search.js" charset="utf-8"></script>
+  <title>Common Cordova</title>
+ </head>
+ <body onload="prettyPrint()" style="overflow: auto;">
+
+ <div id="toc-navigation">
+    <div id="profile">
+        <p><img alt="Mobile Web" src="../../../images/mobile_s_w.png"/> <img alt="Wearable Web" src="../../../images/wearable_s_w.png"/></p>
+    </div>
+
+    <div id="toc_border"><div id="toc">
+        <p class="toc-title">Related Info</p>
+        <ul class="toc">
+            <li><a href="../../../../../org.tizen.web.apireference/html/device_api/mobile/tizen/cordova/cordova.html">Common Cordova API for Mobile Web</a></li>
+            <li><a href="../../../../../org.tizen.web.apireference/html/device_api/wearable/tizen/cordova/cordova.html">Common Cordova API for Wearable Web</a></li>
+            <li><a href="../../../../../org.tizen.web.apireference/html/device_api/tv/tizen/cordova/cordova.html">Common Cordova API for TV Web</a></li>
+            </ul>
+    </div></div>
+</div>
+
+<div id="container"><div id="contents"><div class="content">
+  <h1>Common Cordova</h1>
+
+
+<p>Defines a global interface, containing only one empty member: <span style="font-family: monospace">cordova</span>.</p>
+<p><span style="font-family: monospace">window</span> implements the interface.</p>
+<p>Defines common interface for success and error callbacks. Success calbacks doesn't have any arguments, and return no value.
+Error callbacks have one argument:</p>
+<pre class="prettyprint">function f(error) {
+    ...
+}</pre>
+
+<p>With the argument having following properties:</p>
+
+<table>
+<caption>error properties</caption>
+<tbody>
+    <tr>
+     <th>Property</th>
+     <th>Value</th>
+    </tr>
+    <tr>
+        <td>code</td><td>Number representing the type of the error</td>
+    </tr>
+    <tr>
+        <td>name</td><td>Short text representing the type of the error</td>
+    </tr>
+    <tr>
+        <td>message</td><td>Text containing information about the error</td>
+    </tr>
+</tbody>
+</table>
+
+<script type="text/javascript" src="../../../scripts/jquery.zclip.min.js"></script>
+<script type="text/javascript" src="../../../scripts/showhide.js"></script>
+</div></div></div>
+
+<a class="top sms" href="#"><img src="../../../images/btn_top.gif" alt="Go to top" /></a>
+
+<div id="footer">
+<p class="footer">Except as noted, this content - excluding the Code Examples - is licensed under <a href="http://creativecommons.org/licenses/by/3.0/legalcode" target="_blank">Creative Commons Attribution 3.0</a> and all of the Code Examples contained herein are licensed under <a href="https://www.tizen.org/bsd-3-clause-license" target="_blank">BSD-3-Clause</a>.<br/>For details, see the <a href="https://www.tizen.org/content-license" target="_blank">Content License</a>.</p>
+</div>
+
+<script type="text/javascript">
+var _gaq = _gaq || [];
+_gaq.push(['_setAccount', 'UA-25976949-1']);
+_gaq.push(['_trackPageview']);
+(function() {
+var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+})();
+</script>
+
+</body>
+</html>