You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by sarangan12 <gi...@git.apache.org> on 2016/02/02 22:36:04 UTC

[GitHub] cordova-docs pull request: CB-10351: Make Events page a reference

GitHub user sarangan12 opened a pull request:

    https://github.com/apache/cordova-docs/pull/480

    CB-10351: Make Events page a reference

    Made the Events page a reference
    
    @nikhilkh @dblotsky @rakatyal @riknoll @omefire Can you please review and merge this PR? 

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/sarangan12/cordova-docs CB-10351

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cordova-docs/pull/480.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #480
    
----
commit 3cb84cff15ccb52797bdd89af036e8a6963d00d3
Author: Sarangan Rajamanickam <sa...@microsoft.com>
Date:   2016-02-02T21:31:23Z

    CB-10351: Make Events page a reference
    
    Made the Events page a reference

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-docs pull request: CB-10351: Make Events page a reference

Posted by rakatyal <gi...@git.apache.org>.
Github user rakatyal commented on the pull request:

    https://github.com/apache/cordova-docs/pull/480#issuecomment-178870956
  
    LGTM.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-docs pull request: CB-10351: Make Events page a reference

Posted by sarangan12 <gi...@git.apache.org>.
Github user sarangan12 commented on a diff in the pull request:

    https://github.com/apache/cordova-docs/pull/480#discussion_r51651676
  
    --- Diff: www/static/js/docs.js ---
    @@ -40,7 +40,7 @@ $(document).ready(function () {
     
         // Table of Contents
         $('#page-toc').toc({
    -        'selectors':         'h1,h2,h3,h4,h5,h6', // elements to use as headings
    +        'selectors':         'h1,h2', // elements to use as headings
    --- End diff --
    
    @riknoll Ideally, I would have preferred a seperate commit. But this is a one-off case. With the changes to the events page, ToC will be cuttered. So, adding it here.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-docs pull request: CB-10351: Make Events page a reference

Posted by riknoll <gi...@git.apache.org>.
Github user riknoll commented on the pull request:

    https://github.com/apache/cordova-docs/pull/480#issuecomment-178871869
  
    I mentioned this offline, but do we want to include the full example for each event? Adds a lot of length to the document and all of the examples are the same with strings swapped. I think the quick examples are sufficient.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-docs pull request: CB-10351: Make Events page a reference

Posted by nikhilkh <gi...@git.apache.org>.
Github user nikhilkh commented on a diff in the pull request:

    https://github.com/apache/cordova-docs/pull/480#discussion_r51769377
  
    --- Diff: www/docs/en/dev/cordova/events/events.md ---
    @@ -22,29 +22,384 @@ title: Events
     
     # Events
     
    -> Cordova lifecycle events.
    +There are various events provided by cordova to be used by the application. 
    +The application code could add listeners for these events. For example:
     
    -## Event Types
    +**HTML File**
     
    -- [deviceready](events.deviceready.html)
    -- [pause](events.pause.html)
    -- [resume](events.resume.html)
    -- [backbutton](events.backbutton.html)
    -- [menubutton](events.menubutton.html)
    -- [searchbutton](events.searchbutton.html)
    -- [startcallbutton](events.startcallbutton.html)
    -- [endcallbutton](events.endcallbutton.html)
    -- [volumedownbutton](events.volumedownbutton.html)
    -- [volumeupbutton](events.volumeupbutton.html)
    +    <!DOCTYPE html>
    +    <html>
    +      <head>
    +        <title>Device Ready Example</title>
     
    -## Events added by [cordova-plugin-battery-status](https://github.com/apache/cordova-plugin-battery-status/blob/master/README.md)
    +        <script type="text/javascript" charset="utf-8" src="cordova.js"></script>
    +        <script type="text/javascript" charset="utf-8" src="example.js"></script>
    +      </head>
    +      <body onload="onLoad()">
    +      </body>
    +    </html>
     
    -- batterycritical
    -- batterylow
    -- batterystatus
    +**JS File**
     
    -## Events added by [cordova-plugin-network-information](https://github.com/apache/cordova-plugin-network-information/blob/master/README.md)
    +    // example.js file
    +    // Wait for device API libraries to load
    +    //
    +    function onLoad() {
    +        document.addEventListener("deviceready", onDeviceReady, false);
    +    }
     
    -- online
    -- offline
    +    // device APIs are available
    +    //
    +    function onDeviceReady() {
    +        document.addEventListener("pause", onPause, false);
    +        document.addEventListener("resume", onResume, false);
    +        document.addEventListener("menubutton", onMenuKeyDown, false);
    +        // Add similar listeners for other events 
    +    }
     
    +    function onPause() {
    +        // Handle the pause event
    +    }
    +
    +    function onResume() {
    +        // Handle the resume event
    +    }
    +
    +    function onMenuKeyDown() {
    +        // Handle the menubutton event
    +    }
    +
    +    // Add similar event handlers for other events
    +
    +**Note**: Applications typically should use `document.addEventListener` to
    +attach an event listener once the [deviceready](#link-deviceready) 
    +event fires.
    +
    +The following table lists the cordova events and the supported platforms:
    +
    +<!-- START HTML -->
    +
    +<table class="compat" width="100%">
    +
    +<thead>
    +    <tr>
    +        <th>Supported Platforms/<br/>Events</td>
    +        <th>amazon-fireos</th>
    +        <th>android</th>
    +        <th>blackberry10</th>
    +        <th>ios</th>
    +        <th>Windows Phone 8</th>
    +        <th>Windows</th>
    +    </tr>
    +</thead>
    +
    +<tbody>    
    +    <tr>
    +        <th><a href="#link-deviceready">deviceready</a></th>
    +        <td data-col="amazon-fireos" class="y"></td>
    +        <td data-col="android"    class="y"></td>
    +        <td data-col="blackberry10" class="y"></td>
    +        <td data-col="ios"        class="y"></td>
    +        <td data-col="winphone8"  class="y"></td>
    +        <td data-col="win"       class="y"></td>
    +    </tr>
    +
    +    <tr>
    +        <th><a href="#link-pause">pause</a></th>
    +        <td data-col="amazon-fireos" class="y"></td>
    +        <td data-col="android"    class="y"></td>
    +        <td data-col="blackberry10" class="y"></td>
    +        <td data-col="ios"        class="y"></td>
    +        <td data-col="winphone8"  class="y"></td>
    +        <td data-col="win"       class="y"></td>
    +    </tr>
    +
    +    <tr>
    +        <th><a href="#link-resume">resume</a></th>
    +        <td data-col="amazon-fireos" class="y"></td>
    +        <td data-col="android"    class="y"></td>
    +        <td data-col="blackberry10" class="y"></td>
    +        <td data-col="ios"        class="y"></td>
    +        <td data-col="winphone8"  class="y"></td>
    +        <td data-col="win"       class="y"></td>
    +    </tr>
    +
    +    <tr>
    +        <th><a href="#link-backbutton">backbutton</a></th>
    +        <td data-col="amazon-fireos" class="y"></td>
    +        <td data-col="android"    class="y"></td>
    +        <td data-col="blackberry10" class="y"></td>
    +        <td data-col="ios"        class="n"></td>
    +        <td data-col="winphone8"  class="n"></td>
    +        <td data-col="win"       class="y"></td>
    +    </tr>
    +
    +    <tr>
    +        <th><a href="#link-menubutton">menubutton</a></th>
    +        <td data-col="amazon-fireos" class="y"></td>
    +        <td data-col="android"    class="y"></td>
    +        <td data-col="blackberry10" class="y"></td>
    +        <td data-col="ios"        class="n"></td>
    +        <td data-col="winphone8"  class="n"></td>
    +        <td data-col="win"       class="n"></td>
    +    </tr>
    +
    +    <tr>
    +        <th><a href="#link-searchbutton">searchbutton</a></th>
    +        <td data-col="amazon-fireos" class="n"></td>
    +        <td data-col="android"    class="y"></td>
    +        <td data-col="blackberry10" class="n"></td>
    +        <td data-col="ios"        class="n"></td>
    +        <td data-col="winphone8"  class="n"></td>
    +        <td data-col="win"       class="n"></td>
    +    </tr>
    +
    +    <tr>
    +        <th><a href="#link-startcallbutton">startcallbutton</a></th>
    +        <td data-col="amazon-fireos" class="n"></td>
    +        <td data-col="android"    class="n"></td>
    +        <td data-col="blackberry10" class="y"></td>
    +        <td data-col="ios"        class="n"></td>
    +        <td data-col="winphone8"  class="n"></td>
    +        <td data-col="win"       class="n"></td>
    +    </tr>
    +
    +    <tr>
    +        <th><a href="#link-endcallbutton">endcallbutton</a></th>
    +        <td data-col="amazon-fireos" class="n"></td>
    +        <td data-col="android"    class="n"></td>
    +        <td data-col="blackberry10" class="y"></td>
    +        <td data-col="ios"        class="n"></td>
    +        <td data-col="winphone8"  class="n"></td>
    +        <td data-col="win"       class="n"></td>
    +    </tr>
    +
    +    <tr>
    +        <th><a href="#link-volumedownbutton">volumedownbutton</a></th>
    +        <td data-col="amazon-fireos" class="n"></td>
    +        <td data-col="android"    class="y"></td>
    +        <td data-col="blackberry10" class="y"></td>
    +        <td data-col="ios"        class="n"></td>
    +        <td data-col="winphone8"  class="n"></td>
    +        <td data-col="win"       class="n"></td>
    +    </tr>
    +
    +    <tr>
    +        <th><a href="#link-volumeupbutton">volumeupbutton</a></th>
    +        <td data-col="amazon-fireos" class="n"></td>
    +        <td data-col="android"    class="y"></td>
    +        <td data-col="blackberry10" class="y"></td>
    +        <td data-col="ios"        class="n"></td>
    +        <td data-col="winphone8"  class="n"></td>
    +        <td data-col="win"       class="n"></td>
    +    </tr>    
    +</tbody>
    +</table>
    +
    +<!-- END HTML -->
    +
    +
    +## deviceready
    +
    +The deviceready event fires when Cordova is fully loaded. This event is 
    +essential to any application. It signals that Cordova's device APIs have 
    +loaded and are ready to access.
    +
    +Cordova consists of two code bases: native and JavaScript. While the
    +native code loads, a custom loading image displays. However,
    +JavaScript only loads once the DOM loads. This means the web app may
    +potentially call a Cordova JavaScript function before the
    +corresponding native code becomes available.
    +
    +The `deviceready` event fires once Cordova has fully loaded. Once the
    +event fires, you can safely make calls to Cordova APIs.  Applications
    +typically attach an event listener with `document.addEventListener`
    +once the HTML document's DOM has loaded.
    +
    +The `deviceready` event behaves somewhat differently from others.  Any
    +event handler registered after the `deviceready` event fires has its
    +callback function called immediately.
    +
    +### Quick Example
    +
    +    document.addEventListener("deviceready", onDeviceReady, false);
    +
    +    function onDeviceReady() {
    +        // Now safe to use device APIs
    +    }
    +
    +## pause
    +
    +The pause event fires when the native platform puts the application into the background, 
    +typically when the user switches to a different application.
    +
    +### Quick Example
    +
    +    document.addEventListener("pause", onPause, false);
    +
    +    function onPause() {
    +        // Handle the pause event
    +    }
    +
    +### iOS Quirks
    +
    +In the `pause` handler, any calls to the Cordova API or to native
    +plugins that go through Objective-C do not work, along with any
    +interactive calls, such as alerts or `console.log()`. They are only
    +processed when the app resumes, on the next run loop.
    +
    +The iOS-specific `resign` event is available as an alternative to
    +`pause`, and detects when users enable the __Lock__ button to lock the
    +device with the app running in the foreground.  If the app (and
    +device) is enabled for multi-tasking, this is paired with a subsequent
    +`pause` event, but only under iOS 5. In effect, all locked apps in iOS
    +5 that have multi-tasking enabled are pushed to the background.  For
    +apps to remain running when locked under iOS 5, disable the app's
    +multi-tasking by setting [UIApplicationExitsOnSuspend][UIApplicationExitsOnSuspend]
    +to `YES`. To run when locked on iOS 4, this setting does not matter.
    +
    +## resume
    +
    +The `resume` event fires when the native platform pulls the application out from the background.
    +
    +### Quick Example
    +
    +    document.addEventListener("resume", onResume, false);
    +
    +    function onResume() {
    +        // Handle the resume event
    +    }
    +
    +### iOS Quirks
    +
    +Any interactive functions called from a [pause](#link-pause) event handler execute
    +later when the app resumes, as signaled by the `resume` event. These
    +include alerts, `console.log()`, and any calls from plugins or the
    +Cordova API, which go through Objective-C.
    +
    +- __active__ event
    +
    +    The iOS-specific `active` event is available as an alternative to
    +`resume`, and detects when users disable the __Lock__ button to unlock
    +the device with the app running in the foreground.  If the app (and
    +device) is enabled for multi-tasking, this is paired with a subsequent
    +`resume` event, but only under iOS 5. In effect, all locked apps in
    +iOS 5 that have multi-tasking enabled are pushed to the background.
    +For apps to remain running when locked under iOS 5, disable the app's
    +multi-tasking by setting [UIApplicationExitsOnSuspend][UIApplicationExitsOnSuspend]
    +to `YES`. To run when locked on iOS 4, this setting does not matter.
    +    
    +- __resume__ event
    +
    +    When called from a `resume` event handler, interactive functions such
    +as `alert()` need to be wrapped in a `setTimeout()` call with a
    +timeout value of zero, or else the app hangs. For example:
    +
    +        document.addEventListener("resume", onResume, false);
    +        function onResume() {
    +           setTimeout(function() {
    +                  // TODO: do your thing!
    +                }, 0);
    +        }
    +
    +### Android Quirks
    +
    +Refer [Android Life Cycle Guide][AndroidLifeCycleGuide] for details on android quirks with
    +the `resume` event.
    +
    +## backbutton
    +
    +The event fires when the user presses the back button. To override the default 
    +back-button behavior, register an event listener for the `backbutton` event.
    +It is no longer necessary to call any other method to override the
    +back-button behavior.
    +
    +### Quick Example
    +
    +    document.addEventListener("backbutton", onBackKeyDown, false);
    +
    +    function onBackKeyDown() {
    +        // Handle the back button
    +    }
    +
    +## menubutton
    +
    +The event fires when the user presses the menu button. Applying an event handler 
    +overrides the default menu button behavior.
    +
    +### Quick Example
    +
    +    document.addEventListener("menubutton", onMenuKeyDown, false);
    +
    +    function onMenuKeyDown() {
    +        // Handle the back button
    +    }
    +
    +## searchbutton
    +
    +The event fires when the user presses the search button on Android. If you need to 
    +override the default search button behavior on Android you can register an event 
    +listener for the 'searchbutton' event.
    +
    +### Quick Example
    +
    +    document.addEventListener("searchbutton", onSearchKeyDown, false);
    +
    +    function onSearchKeyDown() {
    +        // Handle the search button
    +    }
    +
    +## startcallbutton
    +
    +The event fires when the user presses the start call button. If you need to override 
    +the default start call behavior you can register an event listener for the `startcallbutton` event.
    +
    +### Quick Example
    +
    +    document.addEventListener("startcallbutton", onStartCallKeyDown, false);
    +
    +    function onStartCallKeyDown() {
    +        // Handle the start call button
    +    }
    +
    +## endcallbutton
    +
    +This event fires when the user presses the end call button. The event overrides the 
    +default end call behavior.
    +
    +### Quick Example
    +
    +    document.addEventListener("endcallbutton", onEndCallKeyDown, false);
    +
    +    function onEndCallKeyDown() {
    +        // Handle the end call button
    +    }
    +
    +## volumedownbutton
    +
    +The event fires when the user presses the volume down button. If you need to override 
    +the default volume down behavior you can register an event listener for the `volumedownbutton` event.
    +
    +### Quick Example
    +
    +    document.addEventListener("volumedownbutton", onVolumeDownKeyDown, false);
    +
    +    function onVolumeDownKeyDown() {
    +        // Handle the volume down button
    +    }
    +
    +## volumeupbutton
    +
    +The event fires when the user presses the volume up button. If you need to override 
    +the default volume up behavior you can register an event listener for the `volumeupbutton` event.
    +
    +### Quick Example
    +
    +    document.addEventListener("volumeupbutton", onVolumeUpKeyDown, false);
    +
    +    function onVolumeUpKeyDown() {
    +        // Handle the volume up button
    +    }
    +
    +[UIApplicationExitsOnSuspend]: http://developer.apple.com/library/ios/#documentation/general/Reference/InfoPlistKeyReference/Articles/iPhoneOSKeys.html
    +[AndroidLifeCycleGuide]: {{ site.baseurl }}/docs/en/dev/guide/platforms/android/lifecycle.html
    --- End diff --
    
    Should this be a relative reference instead?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-docs pull request: CB-10351: Make Events page a reference

Posted by rakatyal <gi...@git.apache.org>.
Github user rakatyal commented on the pull request:

    https://github.com/apache/cordova-docs/pull/480#issuecomment-178872718
  
    +1 to Richard's point. They hardly add anything relevant and the format repeats for each event. I think that we can rename it to example, give the full example for the first event and keep the quick example content for others to follow.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-docs pull request: CB-10351: Make Events page a reference

Posted by sarangan12 <gi...@git.apache.org>.
Github user sarangan12 commented on a diff in the pull request:

    https://github.com/apache/cordova-docs/pull/480#discussion_r51646371
  
    --- Diff: www/docs/en/dev/cordova/events/events.md ---
    @@ -22,29 +22,561 @@ title: Events
     
     # Events
     
    -> Cordova lifecycle events.
    +<!-- START HTML -->
     
    -## Event Types
    +<table class="compat" width="100%">
     
    -- [deviceready](events.deviceready.html)
    -- [pause](events.pause.html)
    -- [resume](events.resume.html)
    -- [backbutton](events.backbutton.html)
    -- [menubutton](events.menubutton.html)
    -- [searchbutton](events.searchbutton.html)
    -- [startcallbutton](events.startcallbutton.html)
    -- [endcallbutton](events.endcallbutton.html)
    -- [volumedownbutton](events.volumedownbutton.html)
    -- [volumeupbutton](events.volumeupbutton.html)
    +<thead>
    +    <tr>
    +        <th>Supported Platforms/<br/>Events</td>
    +        <th>amazon-fireos</th>
    +        <th>android</th>
    +        <th>blackberry10</th>
    +        <th>ios</th>
    +        <th>Windows Phone 8</th>
    +        <th>Windows</th>
    +    </tr>
    +</thead>
     
    -## Events added by [cordova-plugin-battery-status](https://github.com/apache/cordova-plugin-battery-status/blob/master/README.md)
    +<tbody>    
    +    <tr>
    +        <th><a href="#link-deviceready">deviceready</a></th>
    +        <td data-col="amazon-fireos" class="y"></td>
    +        <td data-col="android"    class="y"></td>
    +        <td data-col="blackberry10" class="y"></td>
    +        <td data-col="ios"        class="y"></td>
    +        <td data-col="winphone8"  class="y"></td>
    +        <td data-col="win"       class="y"></td>
    +    </tr>
     
    -- batterycritical
    -- batterylow
    -- batterystatus
    +    <tr>
    +        <th><a href="#link-pause">pause</a></th>
    +        <td data-col="amazon-fireos" class="y"></td>
    +        <td data-col="android"    class="y"></td>
    +        <td data-col="blackberry10" class="y"></td>
    +        <td data-col="ios"        class="y"></td>
    +        <td data-col="winphone8"  class="y"></td>
    +        <td data-col="win"       class="y"></td>
    +    </tr>
     
    -## Events added by [cordova-plugin-network-information](https://github.com/apache/cordova-plugin-network-information/blob/master/README.md)
    +    <tr>
    +        <th><a href="#link-resume">resume</a></th>
    +        <td data-col="amazon-fireos" class="y"></td>
    +        <td data-col="android"    class="y"></td>
    +        <td data-col="blackberry10" class="y"></td>
    +        <td data-col="ios"        class="y"></td>
    +        <td data-col="winphone8"  class="y"></td>
    +        <td data-col="win"       class="y"></td>
    +    </tr>
     
    -- online
    -- offline
    +    <tr>
    +        <th><a href="#link-backbutton">backbutton</a></th>
    +        <td data-col="amazon-fireos" class="y"></td>
    +        <td data-col="android"    class="y"></td>
    +        <td data-col="blackberry10" class="y"></td>
    +        <td data-col="ios"        class="n"></td>
    +        <td data-col="winphone8"  class="n"></td>
    +        <td data-col="win"       class="y"></td>
    +    </tr>
     
    +    <tr>
    +        <th><a href="#link-menubutton">menubutton</a></th>
    +        <td data-col="amazon-fireos" class="y"></td>
    +        <td data-col="android"    class="y"></td>
    +        <td data-col="blackberry10" class="y"></td>
    +        <td data-col="ios"        class="n"></td>
    +        <td data-col="winphone8"  class="n"></td>
    +        <td data-col="win"       class="n"></td>
    +    </tr>
    +
    +    <tr>
    +        <th><a href="#link-searchbutton">searchbutton</a></th>
    +        <td data-col="amazon-fireos" class="n"></td>
    +        <td data-col="android"    class="y"></td>
    +        <td data-col="blackberry10" class="n"></td>
    +        <td data-col="ios"        class="n"></td>
    +        <td data-col="winphone8"  class="n"></td>
    +        <td data-col="win"       class="n"></td>
    +    </tr>
    +
    +    <tr>
    +        <th><a href="#link-startcallbutton">startcallbutton</a></th>
    +        <td data-col="amazon-fireos" class="n"></td>
    +        <td data-col="android"    class="n"></td>
    +        <td data-col="blackberry10" class="y"></td>
    +        <td data-col="ios"        class="n"></td>
    +        <td data-col="winphone8"  class="n"></td>
    +        <td data-col="win"       class="n"></td>
    +    </tr>
    +
    +    <tr>
    +        <th><a href="#link-endcallbutton">endcallbutton</a></th>
    +        <td data-col="amazon-fireos" class="n"></td>
    +        <td data-col="android"    class="n"></td>
    +        <td data-col="blackberry10" class="y"></td>
    +        <td data-col="ios"        class="n"></td>
    +        <td data-col="winphone8"  class="n"></td>
    +        <td data-col="win"       class="n"></td>
    +    </tr>
    +
    +    <tr>
    +        <th><a href="#link-volumedownbutton">volumedownbutton</a></th>
    +        <td data-col="amazon-fireos" class="n"></td>
    +        <td data-col="android"    class="y"></td>
    +        <td data-col="blackberry10" class="y"></td>
    +        <td data-col="ios"        class="n"></td>
    +        <td data-col="winphone8"  class="n"></td>
    +        <td data-col="win"       class="n"></td>
    +    </tr>
    +
    +    <tr>
    +        <th><a href="#link-volumeupbutton">volumeupbutton</a></th>
    +        <td data-col="amazon-fireos" class="n"></td>
    +        <td data-col="android"    class="y"></td>
    +        <td data-col="blackberry10" class="y"></td>
    +        <td data-col="ios"        class="n"></td>
    +        <td data-col="winphone8"  class="n"></td>
    +        <td data-col="win"       class="n"></td>
    +    </tr>    
    +</tbody>
    +</table>
    +
    +<!-- END HTML -->
    +
    +
    +**Note**: Applications typically should use `document.addEventListener` to
    +attach an event listener once the [deviceready](#link-deviceready) 
    +event fires.
    +
    +## deviceready
    +
    +The deviceready event fires when Cordova is fully loaded. This event is 
    +essential to any application. It signals that Cordova's device APIs have 
    +loaded and are ready to access.
    +
    +Cordova consists of two code bases: native and JavaScript. While the
    +native code loads, a custom loading image displays. However,
    +JavaScript only loads once the DOM loads. This means the web app may
    +potentially call a Cordova JavaScript function before the
    +corresponding native code becomes available.
    +
    +The `deviceready` event fires once Cordova has fully loaded. Once the
    +event fires, you can safely make calls to Cordova APIs.  Applications
    +typically attach an event listener with `document.addEventListener`
    +once the HTML document's DOM has loaded.
    +
    +The `deviceready` event behaves somewhat differently from others.  Any
    +event handler registered after the `deviceready` event fires has its
    +callback function called immediately.
    +
    +### Quick Example
    +
    +    document.addEventListener("deviceready", onDeviceReady, false);
    +
    +    function onDeviceReady() {
    +        // Now safe to use device APIs
    +    }
    +
    +### Full Example
    +
    +**Note**: For the sake of readability, all the other events assume that you use the
    +below html code.
    +
    +#### HTML File
    +
    +    <!DOCTYPE html>
    +    <html>
    +      <head>
    +        <title>Device Ready Example</title>
    +
    +        <script type="text/javascript" charset="utf-8" src="cordova.js"></script>
    +        <script type="text/javascript" charset="utf-8" src="example.js"></script>
    +      </head>
    +      <body onload="onLoad()">
    +      </body>
    +    </html>
    +
    +#### JS File
    +    // example.js file
    +    // Wait for device API libraries to load
    +    //
    +    function onLoad() {
    +        document.addEventListener("deviceready", onDeviceReady, false);
    +    }
    +
    +    // device APIs are available
    +    //
    +    function onDeviceReady() {
    +        // Now safe to use device APIs
    +    }
    +
    +## pause
    +
    +The pause event fires when an application is put into the background. The `pause` 
    --- End diff --
    
    That was intentional. To explicitly say, this is just a JS file and also what the following function is used. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-docs pull request: CB-10351: Make Events page a reference

Posted by dblotsky <gi...@git.apache.org>.
Github user dblotsky commented on the pull request:

    https://github.com/apache/cordova-docs/pull/480#issuecomment-178872563
  
    +1 to Richard's previous comment.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-docs pull request: CB-10351: Make Events page a reference

Posted by sarangan12 <gi...@git.apache.org>.
Github user sarangan12 commented on a diff in the pull request:

    https://github.com/apache/cordova-docs/pull/480#discussion_r51651551
  
    --- Diff: www/static/js/docs.js ---
    @@ -40,7 +40,7 @@ $(document).ready(function () {
     
         // Table of Contents
         $('#page-toc').toc({
    -        'selectors':         'h1,h2,h3,h4,h5,h6', // elements to use as headings
    +        'selectors':         'h1,h2', // elements to use as headings
    --- End diff --
    
    @dblotsky Its a tradeoff between the semantic meaning and what you want to show in ToC. And, this seems reasonable


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-docs pull request: CB-10351: Make Events page a reference

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/cordova-docs/pull/480


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-docs pull request: CB-10351: Make Events page a reference

Posted by rakatyal <gi...@git.apache.org>.
Github user rakatyal commented on a diff in the pull request:

    https://github.com/apache/cordova-docs/pull/480#discussion_r51646921
  
    --- Diff: www/docs/en/dev/cordova/events/events.md ---
    @@ -22,29 +22,561 @@ title: Events
     
     # Events
     
    -> Cordova lifecycle events.
    +<!-- START HTML -->
     
    -## Event Types
    +<table class="compat" width="100%">
     
    -- [deviceready](events.deviceready.html)
    -- [pause](events.pause.html)
    -- [resume](events.resume.html)
    -- [backbutton](events.backbutton.html)
    -- [menubutton](events.menubutton.html)
    -- [searchbutton](events.searchbutton.html)
    -- [startcallbutton](events.startcallbutton.html)
    -- [endcallbutton](events.endcallbutton.html)
    -- [volumedownbutton](events.volumedownbutton.html)
    -- [volumeupbutton](events.volumeupbutton.html)
    +<thead>
    +    <tr>
    +        <th>Supported Platforms/<br/>Events</td>
    +        <th>amazon-fireos</th>
    +        <th>android</th>
    +        <th>blackberry10</th>
    +        <th>ios</th>
    +        <th>Windows Phone 8</th>
    +        <th>Windows</th>
    +    </tr>
    +</thead>
     
    -## Events added by [cordova-plugin-battery-status](https://github.com/apache/cordova-plugin-battery-status/blob/master/README.md)
    +<tbody>    
    +    <tr>
    +        <th><a href="#link-deviceready">deviceready</a></th>
    +        <td data-col="amazon-fireos" class="y"></td>
    +        <td data-col="android"    class="y"></td>
    +        <td data-col="blackberry10" class="y"></td>
    +        <td data-col="ios"        class="y"></td>
    +        <td data-col="winphone8"  class="y"></td>
    +        <td data-col="win"       class="y"></td>
    +    </tr>
     
    -- batterycritical
    -- batterylow
    -- batterystatus
    +    <tr>
    +        <th><a href="#link-pause">pause</a></th>
    +        <td data-col="amazon-fireos" class="y"></td>
    +        <td data-col="android"    class="y"></td>
    +        <td data-col="blackberry10" class="y"></td>
    +        <td data-col="ios"        class="y"></td>
    +        <td data-col="winphone8"  class="y"></td>
    +        <td data-col="win"       class="y"></td>
    +    </tr>
     
    -## Events added by [cordova-plugin-network-information](https://github.com/apache/cordova-plugin-network-information/blob/master/README.md)
    +    <tr>
    +        <th><a href="#link-resume">resume</a></th>
    +        <td data-col="amazon-fireos" class="y"></td>
    +        <td data-col="android"    class="y"></td>
    +        <td data-col="blackberry10" class="y"></td>
    +        <td data-col="ios"        class="y"></td>
    +        <td data-col="winphone8"  class="y"></td>
    +        <td data-col="win"       class="y"></td>
    +    </tr>
     
    -- online
    -- offline
    +    <tr>
    +        <th><a href="#link-backbutton">backbutton</a></th>
    +        <td data-col="amazon-fireos" class="y"></td>
    +        <td data-col="android"    class="y"></td>
    +        <td data-col="blackberry10" class="y"></td>
    +        <td data-col="ios"        class="n"></td>
    +        <td data-col="winphone8"  class="n"></td>
    +        <td data-col="win"       class="y"></td>
    +    </tr>
     
    +    <tr>
    +        <th><a href="#link-menubutton">menubutton</a></th>
    +        <td data-col="amazon-fireos" class="y"></td>
    +        <td data-col="android"    class="y"></td>
    +        <td data-col="blackberry10" class="y"></td>
    +        <td data-col="ios"        class="n"></td>
    +        <td data-col="winphone8"  class="n"></td>
    +        <td data-col="win"       class="n"></td>
    +    </tr>
    +
    +    <tr>
    +        <th><a href="#link-searchbutton">searchbutton</a></th>
    +        <td data-col="amazon-fireos" class="n"></td>
    +        <td data-col="android"    class="y"></td>
    +        <td data-col="blackberry10" class="n"></td>
    +        <td data-col="ios"        class="n"></td>
    +        <td data-col="winphone8"  class="n"></td>
    +        <td data-col="win"       class="n"></td>
    +    </tr>
    +
    +    <tr>
    +        <th><a href="#link-startcallbutton">startcallbutton</a></th>
    +        <td data-col="amazon-fireos" class="n"></td>
    +        <td data-col="android"    class="n"></td>
    +        <td data-col="blackberry10" class="y"></td>
    +        <td data-col="ios"        class="n"></td>
    +        <td data-col="winphone8"  class="n"></td>
    +        <td data-col="win"       class="n"></td>
    +    </tr>
    +
    +    <tr>
    +        <th><a href="#link-endcallbutton">endcallbutton</a></th>
    +        <td data-col="amazon-fireos" class="n"></td>
    +        <td data-col="android"    class="n"></td>
    +        <td data-col="blackberry10" class="y"></td>
    +        <td data-col="ios"        class="n"></td>
    +        <td data-col="winphone8"  class="n"></td>
    +        <td data-col="win"       class="n"></td>
    +    </tr>
    +
    +    <tr>
    +        <th><a href="#link-volumedownbutton">volumedownbutton</a></th>
    +        <td data-col="amazon-fireos" class="n"></td>
    +        <td data-col="android"    class="y"></td>
    +        <td data-col="blackberry10" class="y"></td>
    +        <td data-col="ios"        class="n"></td>
    +        <td data-col="winphone8"  class="n"></td>
    +        <td data-col="win"       class="n"></td>
    +    </tr>
    +
    +    <tr>
    +        <th><a href="#link-volumeupbutton">volumeupbutton</a></th>
    +        <td data-col="amazon-fireos" class="n"></td>
    +        <td data-col="android"    class="y"></td>
    +        <td data-col="blackberry10" class="y"></td>
    +        <td data-col="ios"        class="n"></td>
    +        <td data-col="winphone8"  class="n"></td>
    +        <td data-col="win"       class="n"></td>
    +    </tr>    
    +</tbody>
    +</table>
    +
    +<!-- END HTML -->
    +
    +
    +**Note**: Applications typically should use `document.addEventListener` to
    +attach an event listener once the [deviceready](#link-deviceready) 
    +event fires.
    +
    +## deviceready
    +
    +The deviceready event fires when Cordova is fully loaded. This event is 
    +essential to any application. It signals that Cordova's device APIs have 
    +loaded and are ready to access.
    +
    +Cordova consists of two code bases: native and JavaScript. While the
    +native code loads, a custom loading image displays. However,
    +JavaScript only loads once the DOM loads. This means the web app may
    +potentially call a Cordova JavaScript function before the
    +corresponding native code becomes available.
    +
    +The `deviceready` event fires once Cordova has fully loaded. Once the
    +event fires, you can safely make calls to Cordova APIs.  Applications
    +typically attach an event listener with `document.addEventListener`
    +once the HTML document's DOM has loaded.
    +
    +The `deviceready` event behaves somewhat differently from others.  Any
    +event handler registered after the `deviceready` event fires has its
    +callback function called immediately.
    +
    +### Quick Example
    +
    +    document.addEventListener("deviceready", onDeviceReady, false);
    +
    +    function onDeviceReady() {
    +        // Now safe to use device APIs
    +    }
    +
    +### Full Example
    +
    +**Note**: For the sake of readability, all the other events assume that you use the
    +below html code.
    +
    +#### HTML File
    +
    +    <!DOCTYPE html>
    +    <html>
    +      <head>
    +        <title>Device Ready Example</title>
    +
    +        <script type="text/javascript" charset="utf-8" src="cordova.js"></script>
    +        <script type="text/javascript" charset="utf-8" src="example.js"></script>
    +      </head>
    +      <body onload="onLoad()">
    +      </body>
    +    </html>
    +
    +#### JS File
    +    // example.js file
    +    // Wait for device API libraries to load
    +    //
    +    function onLoad() {
    +        document.addEventListener("deviceready", onDeviceReady, false);
    +    }
    +
    +    // device APIs are available
    +    //
    +    function onDeviceReady() {
    +        // Now safe to use device APIs
    +    }
    +
    +## pause
    +
    +The pause event fires when an application is put into the background. The `pause` 
    --- End diff --
    
    I meant the description of 'pause' event. We can probably make it a single line.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-docs pull request: CB-10351: Make Events page a reference

Posted by rakatyal <gi...@git.apache.org>.
Github user rakatyal commented on a diff in the pull request:

    https://github.com/apache/cordova-docs/pull/480#discussion_r51646137
  
    --- Diff: www/docs/en/dev/cordova/events/events.md ---
    @@ -22,29 +22,561 @@ title: Events
     
     # Events
     
    -> Cordova lifecycle events.
    +<!-- START HTML -->
     
    -## Event Types
    +<table class="compat" width="100%">
     
    -- [deviceready](events.deviceready.html)
    -- [pause](events.pause.html)
    -- [resume](events.resume.html)
    -- [backbutton](events.backbutton.html)
    -- [menubutton](events.menubutton.html)
    -- [searchbutton](events.searchbutton.html)
    -- [startcallbutton](events.startcallbutton.html)
    -- [endcallbutton](events.endcallbutton.html)
    -- [volumedownbutton](events.volumedownbutton.html)
    -- [volumeupbutton](events.volumeupbutton.html)
    +<thead>
    +    <tr>
    +        <th>Supported Platforms/<br/>Events</td>
    +        <th>amazon-fireos</th>
    +        <th>android</th>
    +        <th>blackberry10</th>
    +        <th>ios</th>
    +        <th>Windows Phone 8</th>
    +        <th>Windows</th>
    +    </tr>
    +</thead>
     
    -## Events added by [cordova-plugin-battery-status](https://github.com/apache/cordova-plugin-battery-status/blob/master/README.md)
    +<tbody>    
    +    <tr>
    +        <th><a href="#link-deviceready">deviceready</a></th>
    +        <td data-col="amazon-fireos" class="y"></td>
    +        <td data-col="android"    class="y"></td>
    +        <td data-col="blackberry10" class="y"></td>
    +        <td data-col="ios"        class="y"></td>
    +        <td data-col="winphone8"  class="y"></td>
    +        <td data-col="win"       class="y"></td>
    +    </tr>
     
    -- batterycritical
    -- batterylow
    -- batterystatus
    +    <tr>
    +        <th><a href="#link-pause">pause</a></th>
    +        <td data-col="amazon-fireos" class="y"></td>
    +        <td data-col="android"    class="y"></td>
    +        <td data-col="blackberry10" class="y"></td>
    +        <td data-col="ios"        class="y"></td>
    +        <td data-col="winphone8"  class="y"></td>
    +        <td data-col="win"       class="y"></td>
    +    </tr>
     
    -## Events added by [cordova-plugin-network-information](https://github.com/apache/cordova-plugin-network-information/blob/master/README.md)
    +    <tr>
    +        <th><a href="#link-resume">resume</a></th>
    +        <td data-col="amazon-fireos" class="y"></td>
    +        <td data-col="android"    class="y"></td>
    +        <td data-col="blackberry10" class="y"></td>
    +        <td data-col="ios"        class="y"></td>
    +        <td data-col="winphone8"  class="y"></td>
    +        <td data-col="win"       class="y"></td>
    +    </tr>
     
    -- online
    -- offline
    +    <tr>
    +        <th><a href="#link-backbutton">backbutton</a></th>
    +        <td data-col="amazon-fireos" class="y"></td>
    +        <td data-col="android"    class="y"></td>
    +        <td data-col="blackberry10" class="y"></td>
    +        <td data-col="ios"        class="n"></td>
    +        <td data-col="winphone8"  class="n"></td>
    +        <td data-col="win"       class="y"></td>
    +    </tr>
     
    +    <tr>
    +        <th><a href="#link-menubutton">menubutton</a></th>
    +        <td data-col="amazon-fireos" class="y"></td>
    +        <td data-col="android"    class="y"></td>
    +        <td data-col="blackberry10" class="y"></td>
    +        <td data-col="ios"        class="n"></td>
    +        <td data-col="winphone8"  class="n"></td>
    +        <td data-col="win"       class="n"></td>
    +    </tr>
    +
    +    <tr>
    +        <th><a href="#link-searchbutton">searchbutton</a></th>
    +        <td data-col="amazon-fireos" class="n"></td>
    +        <td data-col="android"    class="y"></td>
    +        <td data-col="blackberry10" class="n"></td>
    +        <td data-col="ios"        class="n"></td>
    +        <td data-col="winphone8"  class="n"></td>
    +        <td data-col="win"       class="n"></td>
    +    </tr>
    +
    +    <tr>
    +        <th><a href="#link-startcallbutton">startcallbutton</a></th>
    +        <td data-col="amazon-fireos" class="n"></td>
    +        <td data-col="android"    class="n"></td>
    +        <td data-col="blackberry10" class="y"></td>
    +        <td data-col="ios"        class="n"></td>
    +        <td data-col="winphone8"  class="n"></td>
    +        <td data-col="win"       class="n"></td>
    +    </tr>
    +
    +    <tr>
    +        <th><a href="#link-endcallbutton">endcallbutton</a></th>
    +        <td data-col="amazon-fireos" class="n"></td>
    +        <td data-col="android"    class="n"></td>
    +        <td data-col="blackberry10" class="y"></td>
    +        <td data-col="ios"        class="n"></td>
    +        <td data-col="winphone8"  class="n"></td>
    +        <td data-col="win"       class="n"></td>
    +    </tr>
    +
    +    <tr>
    +        <th><a href="#link-volumedownbutton">volumedownbutton</a></th>
    +        <td data-col="amazon-fireos" class="n"></td>
    +        <td data-col="android"    class="y"></td>
    +        <td data-col="blackberry10" class="y"></td>
    +        <td data-col="ios"        class="n"></td>
    +        <td data-col="winphone8"  class="n"></td>
    +        <td data-col="win"       class="n"></td>
    +    </tr>
    +
    +    <tr>
    +        <th><a href="#link-volumeupbutton">volumeupbutton</a></th>
    +        <td data-col="amazon-fireos" class="n"></td>
    +        <td data-col="android"    class="y"></td>
    +        <td data-col="blackberry10" class="y"></td>
    +        <td data-col="ios"        class="n"></td>
    +        <td data-col="winphone8"  class="n"></td>
    +        <td data-col="win"       class="n"></td>
    +    </tr>    
    +</tbody>
    +</table>
    +
    +<!-- END HTML -->
    +
    +
    +**Note**: Applications typically should use `document.addEventListener` to
    +attach an event listener once the [deviceready](#link-deviceready) 
    +event fires.
    +
    +## deviceready
    +
    +The deviceready event fires when Cordova is fully loaded. This event is 
    +essential to any application. It signals that Cordova's device APIs have 
    +loaded and are ready to access.
    +
    +Cordova consists of two code bases: native and JavaScript. While the
    +native code loads, a custom loading image displays. However,
    +JavaScript only loads once the DOM loads. This means the web app may
    +potentially call a Cordova JavaScript function before the
    +corresponding native code becomes available.
    +
    +The `deviceready` event fires once Cordova has fully loaded. Once the
    +event fires, you can safely make calls to Cordova APIs.  Applications
    +typically attach an event listener with `document.addEventListener`
    +once the HTML document's DOM has loaded.
    +
    +The `deviceready` event behaves somewhat differently from others.  Any
    +event handler registered after the `deviceready` event fires has its
    +callback function called immediately.
    +
    +### Quick Example
    +
    +    document.addEventListener("deviceready", onDeviceReady, false);
    +
    +    function onDeviceReady() {
    +        // Now safe to use device APIs
    +    }
    +
    +### Full Example
    +
    +**Note**: For the sake of readability, all the other events assume that you use the
    +below html code.
    +
    +#### HTML File
    +
    +    <!DOCTYPE html>
    +    <html>
    +      <head>
    +        <title>Device Ready Example</title>
    +
    +        <script type="text/javascript" charset="utf-8" src="cordova.js"></script>
    +        <script type="text/javascript" charset="utf-8" src="example.js"></script>
    +      </head>
    +      <body onload="onLoad()">
    +      </body>
    +    </html>
    +
    +#### JS File
    +    // example.js file
    +    // Wait for device API libraries to load
    +    //
    +    function onLoad() {
    +        document.addEventListener("deviceready", onDeviceReady, false);
    +    }
    +
    +    // device APIs are available
    +    //
    +    function onDeviceReady() {
    +        // Now safe to use device APIs
    +    }
    +
    +## pause
    +
    +The pause event fires when an application is put into the background. The `pause` 
    --- End diff --
    
    Line 1 and 2 are repetitive. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-docs pull request: CB-10351: Make Events page a reference

Posted by dblotsky <gi...@git.apache.org>.
Github user dblotsky commented on a diff in the pull request:

    https://github.com/apache/cordova-docs/pull/480#discussion_r51650887
  
    --- Diff: www/static/js/docs.js ---
    @@ -40,7 +40,7 @@ $(document).ready(function () {
     
         // Table of Contents
         $('#page-toc').toc({
    -        'selectors':         'h1,h2,h3,h4,h5,h6', // elements to use as headings
    +        'selectors':         'h1,h2', // elements to use as headings
    --- End diff --
    
    I guess that's an ok workaround. But doesn't that mean that we should use different tags other than headers in the references? This might become confusing when we do use `h3`s properly in a document and then it won't show up in the ToC.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-docs pull request: CB-10351: Make Events page a reference

Posted by sarangan12 <gi...@git.apache.org>.
Github user sarangan12 commented on the pull request:

    https://github.com/apache/cordova-docs/pull/480#issuecomment-178875194
  
    @riknoll @rakatyal @dblotsky Removed the full examples for all except required.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-docs pull request: CB-10351: Make Events page a reference

Posted by sarangan12 <gi...@git.apache.org>.
Github user sarangan12 commented on a diff in the pull request:

    https://github.com/apache/cordova-docs/pull/480#discussion_r51648033
  
    --- Diff: www/docs/en/dev/cordova/events/events.md ---
    @@ -22,29 +22,561 @@ title: Events
     
     # Events
     
    -> Cordova lifecycle events.
    +<!-- START HTML -->
     
    -## Event Types
    +<table class="compat" width="100%">
     
    -- [deviceready](events.deviceready.html)
    -- [pause](events.pause.html)
    -- [resume](events.resume.html)
    -- [backbutton](events.backbutton.html)
    -- [menubutton](events.menubutton.html)
    -- [searchbutton](events.searchbutton.html)
    -- [startcallbutton](events.startcallbutton.html)
    -- [endcallbutton](events.endcallbutton.html)
    -- [volumedownbutton](events.volumedownbutton.html)
    -- [volumeupbutton](events.volumeupbutton.html)
    +<thead>
    +    <tr>
    +        <th>Supported Platforms/<br/>Events</td>
    +        <th>amazon-fireos</th>
    +        <th>android</th>
    +        <th>blackberry10</th>
    +        <th>ios</th>
    +        <th>Windows Phone 8</th>
    +        <th>Windows</th>
    +    </tr>
    +</thead>
     
    -## Events added by [cordova-plugin-battery-status](https://github.com/apache/cordova-plugin-battery-status/blob/master/README.md)
    +<tbody>    
    +    <tr>
    +        <th><a href="#link-deviceready">deviceready</a></th>
    +        <td data-col="amazon-fireos" class="y"></td>
    +        <td data-col="android"    class="y"></td>
    +        <td data-col="blackberry10" class="y"></td>
    +        <td data-col="ios"        class="y"></td>
    +        <td data-col="winphone8"  class="y"></td>
    +        <td data-col="win"       class="y"></td>
    +    </tr>
     
    -- batterycritical
    -- batterylow
    -- batterystatus
    +    <tr>
    +        <th><a href="#link-pause">pause</a></th>
    +        <td data-col="amazon-fireos" class="y"></td>
    +        <td data-col="android"    class="y"></td>
    +        <td data-col="blackberry10" class="y"></td>
    +        <td data-col="ios"        class="y"></td>
    +        <td data-col="winphone8"  class="y"></td>
    +        <td data-col="win"       class="y"></td>
    +    </tr>
     
    -## Events added by [cordova-plugin-network-information](https://github.com/apache/cordova-plugin-network-information/blob/master/README.md)
    +    <tr>
    +        <th><a href="#link-resume">resume</a></th>
    +        <td data-col="amazon-fireos" class="y"></td>
    +        <td data-col="android"    class="y"></td>
    +        <td data-col="blackberry10" class="y"></td>
    +        <td data-col="ios"        class="y"></td>
    +        <td data-col="winphone8"  class="y"></td>
    +        <td data-col="win"       class="y"></td>
    +    </tr>
     
    -- online
    -- offline
    +    <tr>
    +        <th><a href="#link-backbutton">backbutton</a></th>
    +        <td data-col="amazon-fireos" class="y"></td>
    +        <td data-col="android"    class="y"></td>
    +        <td data-col="blackberry10" class="y"></td>
    +        <td data-col="ios"        class="n"></td>
    +        <td data-col="winphone8"  class="n"></td>
    +        <td data-col="win"       class="y"></td>
    +    </tr>
     
    +    <tr>
    +        <th><a href="#link-menubutton">menubutton</a></th>
    +        <td data-col="amazon-fireos" class="y"></td>
    +        <td data-col="android"    class="y"></td>
    +        <td data-col="blackberry10" class="y"></td>
    +        <td data-col="ios"        class="n"></td>
    +        <td data-col="winphone8"  class="n"></td>
    +        <td data-col="win"       class="n"></td>
    +    </tr>
    +
    +    <tr>
    +        <th><a href="#link-searchbutton">searchbutton</a></th>
    +        <td data-col="amazon-fireos" class="n"></td>
    +        <td data-col="android"    class="y"></td>
    +        <td data-col="blackberry10" class="n"></td>
    +        <td data-col="ios"        class="n"></td>
    +        <td data-col="winphone8"  class="n"></td>
    +        <td data-col="win"       class="n"></td>
    +    </tr>
    +
    +    <tr>
    +        <th><a href="#link-startcallbutton">startcallbutton</a></th>
    +        <td data-col="amazon-fireos" class="n"></td>
    +        <td data-col="android"    class="n"></td>
    +        <td data-col="blackberry10" class="y"></td>
    +        <td data-col="ios"        class="n"></td>
    +        <td data-col="winphone8"  class="n"></td>
    +        <td data-col="win"       class="n"></td>
    +    </tr>
    +
    +    <tr>
    +        <th><a href="#link-endcallbutton">endcallbutton</a></th>
    +        <td data-col="amazon-fireos" class="n"></td>
    +        <td data-col="android"    class="n"></td>
    +        <td data-col="blackberry10" class="y"></td>
    +        <td data-col="ios"        class="n"></td>
    +        <td data-col="winphone8"  class="n"></td>
    +        <td data-col="win"       class="n"></td>
    +    </tr>
    +
    +    <tr>
    +        <th><a href="#link-volumedownbutton">volumedownbutton</a></th>
    +        <td data-col="amazon-fireos" class="n"></td>
    +        <td data-col="android"    class="y"></td>
    +        <td data-col="blackberry10" class="y"></td>
    +        <td data-col="ios"        class="n"></td>
    +        <td data-col="winphone8"  class="n"></td>
    +        <td data-col="win"       class="n"></td>
    +    </tr>
    +
    +    <tr>
    +        <th><a href="#link-volumeupbutton">volumeupbutton</a></th>
    +        <td data-col="amazon-fireos" class="n"></td>
    +        <td data-col="android"    class="y"></td>
    +        <td data-col="blackberry10" class="y"></td>
    +        <td data-col="ios"        class="n"></td>
    +        <td data-col="winphone8"  class="n"></td>
    +        <td data-col="win"       class="n"></td>
    +    </tr>    
    +</tbody>
    +</table>
    +
    +<!-- END HTML -->
    +
    +
    +**Note**: Applications typically should use `document.addEventListener` to
    +attach an event listener once the [deviceready](#link-deviceready) 
    +event fires.
    +
    +## deviceready
    +
    +The deviceready event fires when Cordova is fully loaded. This event is 
    +essential to any application. It signals that Cordova's device APIs have 
    +loaded and are ready to access.
    +
    +Cordova consists of two code bases: native and JavaScript. While the
    +native code loads, a custom loading image displays. However,
    +JavaScript only loads once the DOM loads. This means the web app may
    +potentially call a Cordova JavaScript function before the
    +corresponding native code becomes available.
    +
    +The `deviceready` event fires once Cordova has fully loaded. Once the
    +event fires, you can safely make calls to Cordova APIs.  Applications
    +typically attach an event listener with `document.addEventListener`
    +once the HTML document's DOM has loaded.
    +
    +The `deviceready` event behaves somewhat differently from others.  Any
    +event handler registered after the `deviceready` event fires has its
    +callback function called immediately.
    +
    +### Quick Example
    +
    +    document.addEventListener("deviceready", onDeviceReady, false);
    +
    +    function onDeviceReady() {
    +        // Now safe to use device APIs
    +    }
    +
    +### Full Example
    +
    +**Note**: For the sake of readability, all the other events assume that you use the
    +below html code.
    +
    +#### HTML File
    +
    +    <!DOCTYPE html>
    +    <html>
    +      <head>
    +        <title>Device Ready Example</title>
    +
    +        <script type="text/javascript" charset="utf-8" src="cordova.js"></script>
    +        <script type="text/javascript" charset="utf-8" src="example.js"></script>
    +      </head>
    +      <body onload="onLoad()">
    +      </body>
    +    </html>
    +
    +#### JS File
    +    // example.js file
    +    // Wait for device API libraries to load
    +    //
    +    function onLoad() {
    +        document.addEventListener("deviceready", onDeviceReady, false);
    +    }
    +
    +    // device APIs are available
    +    //
    +    function onDeviceReady() {
    +        // Now safe to use device APIs
    +    }
    +
    +## pause
    +
    +The pause event fires when an application is put into the background. The `pause` 
    --- End diff --
    
    Oops. Fixed it now


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-docs pull request: CB-10351: Make Events page a reference

Posted by riknoll <gi...@git.apache.org>.
Github user riknoll commented on a diff in the pull request:

    https://github.com/apache/cordova-docs/pull/480#discussion_r51651548
  
    --- Diff: www/static/js/docs.js ---
    @@ -40,7 +40,7 @@ $(document).ready(function () {
     
         // Table of Contents
         $('#page-toc').toc({
    -        'selectors':         'h1,h2,h3,h4,h5,h6', // elements to use as headings
    +        'selectors':         'h1,h2', // elements to use as headings
    --- End diff --
    
    Confusing for who? I don't think users expect the TOC to be that comprehensive; major headings only should be fine. We do need to be vigilant when we write pages to make sure the TOC displays correctly. I would argue that defining/using other tags just complicates the markdown and defeats the purpose of using it.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-docs pull request: CB-10351: Make Events page a reference

Posted by riknoll <gi...@git.apache.org>.
Github user riknoll commented on a diff in the pull request:

    https://github.com/apache/cordova-docs/pull/480#discussion_r51652071
  
    --- Diff: www/docs/en/dev/cordova/events/events.md ---
    @@ -22,29 +22,386 @@ title: Events
     
     # Events
     
    -> Cordova lifecycle events.
    +<!-- START HTML -->
     
    -## Event Types
    +<table class="compat" width="100%">
     
    -- [deviceready](events.deviceready.html)
    -- [pause](events.pause.html)
    -- [resume](events.resume.html)
    -- [backbutton](events.backbutton.html)
    -- [menubutton](events.menubutton.html)
    -- [searchbutton](events.searchbutton.html)
    -- [startcallbutton](events.startcallbutton.html)
    -- [endcallbutton](events.endcallbutton.html)
    -- [volumedownbutton](events.volumedownbutton.html)
    -- [volumeupbutton](events.volumeupbutton.html)
    +<thead>
    +    <tr>
    +        <th>Supported Platforms/<br/>Events</td>
    +        <th>amazon-fireos</th>
    +        <th>android</th>
    +        <th>blackberry10</th>
    +        <th>ios</th>
    +        <th>Windows Phone 8</th>
    +        <th>Windows</th>
    +    </tr>
    +</thead>
     
    -## Events added by [cordova-plugin-battery-status](https://github.com/apache/cordova-plugin-battery-status/blob/master/README.md)
    +<tbody>    
    +    <tr>
    +        <th><a href="#link-deviceready">deviceready</a></th>
    +        <td data-col="amazon-fireos" class="y"></td>
    +        <td data-col="android"    class="y"></td>
    +        <td data-col="blackberry10" class="y"></td>
    +        <td data-col="ios"        class="y"></td>
    +        <td data-col="winphone8"  class="y"></td>
    +        <td data-col="win"       class="y"></td>
    +    </tr>
     
    -- batterycritical
    -- batterylow
    -- batterystatus
    +    <tr>
    +        <th><a href="#link-pause">pause</a></th>
    +        <td data-col="amazon-fireos" class="y"></td>
    +        <td data-col="android"    class="y"></td>
    +        <td data-col="blackberry10" class="y"></td>
    +        <td data-col="ios"        class="y"></td>
    +        <td data-col="winphone8"  class="y"></td>
    +        <td data-col="win"       class="y"></td>
    +    </tr>
     
    -## Events added by [cordova-plugin-network-information](https://github.com/apache/cordova-plugin-network-information/blob/master/README.md)
    +    <tr>
    +        <th><a href="#link-resume">resume</a></th>
    +        <td data-col="amazon-fireos" class="y"></td>
    +        <td data-col="android"    class="y"></td>
    +        <td data-col="blackberry10" class="y"></td>
    +        <td data-col="ios"        class="y"></td>
    +        <td data-col="winphone8"  class="y"></td>
    +        <td data-col="win"       class="y"></td>
    +    </tr>
     
    -- online
    -- offline
    +    <tr>
    +        <th><a href="#link-backbutton">backbutton</a></th>
    +        <td data-col="amazon-fireos" class="y"></td>
    +        <td data-col="android"    class="y"></td>
    +        <td data-col="blackberry10" class="y"></td>
    +        <td data-col="ios"        class="n"></td>
    +        <td data-col="winphone8"  class="n"></td>
    +        <td data-col="win"       class="y"></td>
    +    </tr>
     
    +    <tr>
    +        <th><a href="#link-menubutton">menubutton</a></th>
    +        <td data-col="amazon-fireos" class="y"></td>
    +        <td data-col="android"    class="y"></td>
    +        <td data-col="blackberry10" class="y"></td>
    +        <td data-col="ios"        class="n"></td>
    +        <td data-col="winphone8"  class="n"></td>
    +        <td data-col="win"       class="n"></td>
    +    </tr>
    +
    +    <tr>
    +        <th><a href="#link-searchbutton">searchbutton</a></th>
    +        <td data-col="amazon-fireos" class="n"></td>
    +        <td data-col="android"    class="y"></td>
    +        <td data-col="blackberry10" class="n"></td>
    +        <td data-col="ios"        class="n"></td>
    +        <td data-col="winphone8"  class="n"></td>
    +        <td data-col="win"       class="n"></td>
    +    </tr>
    +
    +    <tr>
    +        <th><a href="#link-startcallbutton">startcallbutton</a></th>
    +        <td data-col="amazon-fireos" class="n"></td>
    +        <td data-col="android"    class="n"></td>
    +        <td data-col="blackberry10" class="y"></td>
    +        <td data-col="ios"        class="n"></td>
    +        <td data-col="winphone8"  class="n"></td>
    +        <td data-col="win"       class="n"></td>
    +    </tr>
    +
    +    <tr>
    +        <th><a href="#link-endcallbutton">endcallbutton</a></th>
    +        <td data-col="amazon-fireos" class="n"></td>
    +        <td data-col="android"    class="n"></td>
    +        <td data-col="blackberry10" class="y"></td>
    +        <td data-col="ios"        class="n"></td>
    +        <td data-col="winphone8"  class="n"></td>
    +        <td data-col="win"       class="n"></td>
    +    </tr>
    +
    +    <tr>
    +        <th><a href="#link-volumedownbutton">volumedownbutton</a></th>
    +        <td data-col="amazon-fireos" class="n"></td>
    +        <td data-col="android"    class="y"></td>
    +        <td data-col="blackberry10" class="y"></td>
    +        <td data-col="ios"        class="n"></td>
    +        <td data-col="winphone8"  class="n"></td>
    +        <td data-col="win"       class="n"></td>
    +    </tr>
    +
    +    <tr>
    +        <th><a href="#link-volumeupbutton">volumeupbutton</a></th>
    +        <td data-col="amazon-fireos" class="n"></td>
    +        <td data-col="android"    class="y"></td>
    +        <td data-col="blackberry10" class="y"></td>
    +        <td data-col="ios"        class="n"></td>
    +        <td data-col="winphone8"  class="n"></td>
    +        <td data-col="win"       class="n"></td>
    +    </tr>    
    +</tbody>
    +</table>
    +
    +<!-- END HTML -->
    +
    +
    +**Note**: Applications typically should use `document.addEventListener` to
    +attach an event listener once the [deviceready](#link-deviceready) 
    +event fires.
    +
    +## deviceready
    +
    +The deviceready event fires when Cordova is fully loaded. This event is 
    +essential to any application. It signals that Cordova's device APIs have 
    +loaded and are ready to access.
    +
    +Cordova consists of two code bases: native and JavaScript. While the
    +native code loads, a custom loading image displays. However,
    +JavaScript only loads once the DOM loads. This means the web app may
    +potentially call a Cordova JavaScript function before the
    +corresponding native code becomes available.
    +
    +The `deviceready` event fires once Cordova has fully loaded. Once the
    +event fires, you can safely make calls to Cordova APIs.  Applications
    +typically attach an event listener with `document.addEventListener`
    +once the HTML document's DOM has loaded.
    +
    +The `deviceready` event behaves somewhat differently from others.  Any
    +event handler registered after the `deviceready` event fires has its
    +callback function called immediately.
    +
    +### Quick Example
    +
    +    document.addEventListener("deviceready", onDeviceReady, false);
    +
    +    function onDeviceReady() {
    +        // Now safe to use device APIs
    +    }
    +
    +### Full Example
    +
    +#### HTML File
    +
    +    <!DOCTYPE html>
    +    <html>
    +      <head>
    +        <title>Device Ready Example</title>
    +
    +        <script type="text/javascript" charset="utf-8" src="cordova.js"></script>
    +        <script type="text/javascript" charset="utf-8" src="example.js"></script>
    +      </head>
    +      <body onload="onLoad()">
    +      </body>
    +    </html>
    +
    +#### JS File
    +    // example.js file
    +    // Wait for device API libraries to load
    +    //
    +    function onLoad() {
    +        document.addEventListener("deviceready", onDeviceReady, false);
    +    }
    +
    +    // device APIs are available
    +    //
    +    function onDeviceReady() {
    +        // Now safe to use device APIs
    +    }
    +
    +## pause
    +
    +The pause event fires when the native platform puts the application into the background, 
    +typically when the user switches to a different application.
    +
    +### Quick Example
    +
    +    document.addEventListener("pause", onPause, false);
    +
    +    function onPause() {
    +        // Handle the pause event
    +    }
    +
    +### Full Example
    --- End diff --
    
    The pause example remains


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-docs pull request: CB-10351: Make Events page a reference

Posted by dblotsky <gi...@git.apache.org>.
Github user dblotsky commented on a diff in the pull request:

    https://github.com/apache/cordova-docs/pull/480#discussion_r51649541
  
    --- Diff: www/static/js/docs.js ---
    @@ -40,7 +40,7 @@ $(document).ready(function () {
     
         // Table of Contents
         $('#page-toc').toc({
    -        'selectors':         'h1,h2,h3,h4,h5,h6', // elements to use as headings
    +        'selectors':         'h1,h2', // elements to use as headings
    --- End diff --
    
    Why not have `h3,h4,h5,h6` show up in the page ToC?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-docs pull request: CB-10351: Make Events page a reference

Posted by riknoll <gi...@git.apache.org>.
Github user riknoll commented on a diff in the pull request:

    https://github.com/apache/cordova-docs/pull/480#discussion_r51649012
  
    --- Diff: www/docs/en/dev/cordova/events/events.md ---
    @@ -22,29 +22,560 @@ title: Events
     
     # Events
     
    -> Cordova lifecycle events.
    +<!-- START HTML -->
     
    -## Event Types
    +<table class="compat" width="100%">
     
    -- [deviceready](events.deviceready.html)
    -- [pause](events.pause.html)
    -- [resume](events.resume.html)
    -- [backbutton](events.backbutton.html)
    -- [menubutton](events.menubutton.html)
    -- [searchbutton](events.searchbutton.html)
    -- [startcallbutton](events.startcallbutton.html)
    -- [endcallbutton](events.endcallbutton.html)
    -- [volumedownbutton](events.volumedownbutton.html)
    -- [volumeupbutton](events.volumeupbutton.html)
    +<thead>
    +    <tr>
    +        <th>Supported Platforms/<br/>Events</td>
    +        <th>amazon-fireos</th>
    +        <th>android</th>
    +        <th>blackberry10</th>
    +        <th>ios</th>
    +        <th>Windows Phone 8</th>
    +        <th>Windows</th>
    +    </tr>
    +</thead>
     
    -## Events added by [cordova-plugin-battery-status](https://github.com/apache/cordova-plugin-battery-status/blob/master/README.md)
    +<tbody>    
    +    <tr>
    +        <th><a href="#link-deviceready">deviceready</a></th>
    +        <td data-col="amazon-fireos" class="y"></td>
    +        <td data-col="android"    class="y"></td>
    +        <td data-col="blackberry10" class="y"></td>
    +        <td data-col="ios"        class="y"></td>
    +        <td data-col="winphone8"  class="y"></td>
    +        <td data-col="win"       class="y"></td>
    +    </tr>
     
    -- batterycritical
    -- batterylow
    -- batterystatus
    +    <tr>
    +        <th><a href="#link-pause">pause</a></th>
    +        <td data-col="amazon-fireos" class="y"></td>
    +        <td data-col="android"    class="y"></td>
    +        <td data-col="blackberry10" class="y"></td>
    +        <td data-col="ios"        class="y"></td>
    +        <td data-col="winphone8"  class="y"></td>
    +        <td data-col="win"       class="y"></td>
    +    </tr>
     
    -## Events added by [cordova-plugin-network-information](https://github.com/apache/cordova-plugin-network-information/blob/master/README.md)
    +    <tr>
    +        <th><a href="#link-resume">resume</a></th>
    +        <td data-col="amazon-fireos" class="y"></td>
    +        <td data-col="android"    class="y"></td>
    +        <td data-col="blackberry10" class="y"></td>
    +        <td data-col="ios"        class="y"></td>
    +        <td data-col="winphone8"  class="y"></td>
    +        <td data-col="win"       class="y"></td>
    +    </tr>
     
    -- online
    -- offline
    +    <tr>
    +        <th><a href="#link-backbutton">backbutton</a></th>
    +        <td data-col="amazon-fireos" class="y"></td>
    +        <td data-col="android"    class="y"></td>
    +        <td data-col="blackberry10" class="y"></td>
    +        <td data-col="ios"        class="n"></td>
    +        <td data-col="winphone8"  class="n"></td>
    +        <td data-col="win"       class="y"></td>
    +    </tr>
     
    +    <tr>
    +        <th><a href="#link-menubutton">menubutton</a></th>
    +        <td data-col="amazon-fireos" class="y"></td>
    +        <td data-col="android"    class="y"></td>
    +        <td data-col="blackberry10" class="y"></td>
    +        <td data-col="ios"        class="n"></td>
    +        <td data-col="winphone8"  class="n"></td>
    +        <td data-col="win"       class="n"></td>
    +    </tr>
    +
    +    <tr>
    +        <th><a href="#link-searchbutton">searchbutton</a></th>
    +        <td data-col="amazon-fireos" class="n"></td>
    +        <td data-col="android"    class="y"></td>
    +        <td data-col="blackberry10" class="n"></td>
    +        <td data-col="ios"        class="n"></td>
    +        <td data-col="winphone8"  class="n"></td>
    +        <td data-col="win"       class="n"></td>
    +    </tr>
    +
    +    <tr>
    +        <th><a href="#link-startcallbutton">startcallbutton</a></th>
    +        <td data-col="amazon-fireos" class="n"></td>
    +        <td data-col="android"    class="n"></td>
    +        <td data-col="blackberry10" class="y"></td>
    +        <td data-col="ios"        class="n"></td>
    +        <td data-col="winphone8"  class="n"></td>
    +        <td data-col="win"       class="n"></td>
    +    </tr>
    +
    +    <tr>
    +        <th><a href="#link-endcallbutton">endcallbutton</a></th>
    +        <td data-col="amazon-fireos" class="n"></td>
    +        <td data-col="android"    class="n"></td>
    +        <td data-col="blackberry10" class="y"></td>
    +        <td data-col="ios"        class="n"></td>
    +        <td data-col="winphone8"  class="n"></td>
    +        <td data-col="win"       class="n"></td>
    +    </tr>
    +
    +    <tr>
    +        <th><a href="#link-volumedownbutton">volumedownbutton</a></th>
    +        <td data-col="amazon-fireos" class="n"></td>
    +        <td data-col="android"    class="y"></td>
    +        <td data-col="blackberry10" class="y"></td>
    +        <td data-col="ios"        class="n"></td>
    +        <td data-col="winphone8"  class="n"></td>
    +        <td data-col="win"       class="n"></td>
    +    </tr>
    +
    +    <tr>
    +        <th><a href="#link-volumeupbutton">volumeupbutton</a></th>
    +        <td data-col="amazon-fireos" class="n"></td>
    +        <td data-col="android"    class="y"></td>
    +        <td data-col="blackberry10" class="y"></td>
    +        <td data-col="ios"        class="n"></td>
    +        <td data-col="winphone8"  class="n"></td>
    +        <td data-col="win"       class="n"></td>
    +    </tr>    
    +</tbody>
    +</table>
    +
    +<!-- END HTML -->
    +
    +
    +**Note**: Applications typically should use `document.addEventListener` to
    +attach an event listener once the [deviceready](#link-deviceready) 
    +event fires.
    +
    +## deviceready
    +
    +The deviceready event fires when Cordova is fully loaded. This event is 
    +essential to any application. It signals that Cordova's device APIs have 
    +loaded and are ready to access.
    +
    +Cordova consists of two code bases: native and JavaScript. While the
    +native code loads, a custom loading image displays. However,
    +JavaScript only loads once the DOM loads. This means the web app may
    +potentially call a Cordova JavaScript function before the
    +corresponding native code becomes available.
    +
    +The `deviceready` event fires once Cordova has fully loaded. Once the
    +event fires, you can safely make calls to Cordova APIs.  Applications
    +typically attach an event listener with `document.addEventListener`
    +once the HTML document's DOM has loaded.
    +
    +The `deviceready` event behaves somewhat differently from others.  Any
    +event handler registered after the `deviceready` event fires has its
    +callback function called immediately.
    +
    +### Quick Example
    +
    +    document.addEventListener("deviceready", onDeviceReady, false);
    +
    +    function onDeviceReady() {
    +        // Now safe to use device APIs
    +    }
    +
    +### Full Example
    +
    +**Note**: For the sake of readability, all the other events assume that you use the
    +below html code.
    +
    +#### HTML File
    +
    +    <!DOCTYPE html>
    +    <html>
    +      <head>
    +        <title>Device Ready Example</title>
    +
    +        <script type="text/javascript" charset="utf-8" src="cordova.js"></script>
    +        <script type="text/javascript" charset="utf-8" src="example.js"></script>
    +      </head>
    +      <body onload="onLoad()">
    +      </body>
    +    </html>
    +
    +#### JS File
    +    // example.js file
    +    // Wait for device API libraries to load
    +    //
    +    function onLoad() {
    +        document.addEventListener("deviceready", onDeviceReady, false);
    +    }
    +
    +    // device APIs are available
    +    //
    +    function onDeviceReady() {
    +        // Now safe to use device APIs
    +    }
    +
    +## pause
    +
    +The pause event fires when the native platform puts the application into the background, 
    +typically when the user switches to a different application.
    +
    +### Quick Example
    +
    +    document.addEventListener("pause", onPause, false);
    +
    +    function onPause() {
    +        // Handle the pause event
    +    }
    +
    +### Full Example
    +
    +#### JS File
    +    // example.js file
    +    // Wait for device API libraries to load
    +    //
    +    function onLoad() {
    +        document.addEventListener("deviceready", onDeviceReady, false);
    +    }
    +
    +    // device APIs are available
    +    //
    +    function onDeviceReady() {
    +        document.addEventListener("pause", onPause, false);
    +    }
    +
    +    // Handle the pause event
    +    //
    +    function onPause() {
    +    }
    +
    +### iOS Quirks
    +
    +In the `pause` handler, any calls to the Cordova API or to native
    +plugins that go through Objective-C do not work, along with any
    +interactive calls, such as alerts or `console.log()`. They are only
    +processed when the app resumes, on the next run loop.
    +
    +The iOS-specific `resign` event is available as an alternative to
    +`pause`, and detects when users enable the __Lock__ button to lock the
    +device with the app running in the foreground.  If the app (and
    +device) is enabled for multi-tasking, this is paired with a subsequent
    +`pause` event, but only under iOS 5. In effect, all locked apps in iOS
    +5 that have multi-tasking enabled are pushed to the background.  For
    +apps to remain running when locked under iOS 5, disable the app's
    +multi-tasking by setting [UIApplicationExitsOnSuspend][UIApplicationExitsOnSuspend]
    +to `YES`. To run when locked on iOS 4, this setting does not matter.
    +
    +## resume
    +
    +The `resume` event fires when the native platform pulls the application out from the background.
    +
    +### Quick Example
    +
    +    document.addEventListener("resume", onResume, false);
    +
    +    function onResume() {
    +        // Handle the resume event
    +    }
    +
    +### Full Example
    +
    +#### JS File
    +    // example.js file
    +    // Wait for device API libraries to load
    +    //
    +    function onLoad() {
    +        document.addEventListener("deviceready", onDeviceReady, false);
    +    }
    +
    +    // device APIs are available
    +    //
    +    function onDeviceReady() {
    +        document.addEventListener("resume", onResume, false);
    +    }
    +
    +    // Handle the resume event
    +    //
    +    function onResume() {
    +    }
    +
    +### iOS Quirks
    +
    +Any interactive functions called from a [pause](#link-pause) event handler execute
    +later when the app resumes, as signaled by the `resume` event. These
    +include alerts, `console.log()`, and any calls from plugins or the
    +Cordova API, which go through Objective-C.
    +
    +- __active__ event
    +
    +    The iOS-specific `active` event is available as an alternative to
    +`resume`, and detects when users disable the __Lock__ button to unlock
    +the device with the app running in the foreground.  If the app (and
    +device) is enabled for multi-tasking, this is paired with a subsequent
    +`resume` event, but only under iOS 5. In effect, all locked apps in
    +iOS 5 that have multi-tasking enabled are pushed to the background.
    +For apps to remain running when locked under iOS 5, disable the app's
    +multi-tasking by setting [UIApplicationExitsOnSuspend][UIApplicationExitsOnSuspend]
    +to `YES`. To run when locked on iOS 4, this setting does not matter.
    +    
    +- __resume__ event
    +
    +    When called from a `resume` event handler, interactive functions such
    +as `alert()` need to be wrapped in a `setTimeout()` call with a
    +timeout value of zero, or else the app hangs. For example:
    +
    +        document.addEventListener("resume", onResume, false);
    +        function onResume() {
    +           setTimeout(function() {
    +                  // TODO: do your thing!
    +                }, 0);
    +        }
    +
    +### Android Quirks
    +
    +Refer [Android Life Cycle Guide][AndroidLifeCycleGuide] for details on android quirks for
    --- End diff --
    
    Minor formatting/grammar edit:
    
    Refer to the [Android Life Cycle Guide][AndroidLifeCycleGuide] for details on Android quirks with the `resume` event.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-docs pull request: CB-10351: Make Events page a reference

Posted by riknoll <gi...@git.apache.org>.
Github user riknoll commented on the pull request:

    https://github.com/apache/cordova-docs/pull/480#issuecomment-178844879
  
    Resume event should add an Android quirk that points to this page: http://cordova.apache.org/docs/en/dev/guide/platforms/android/lifecycle.html


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-docs pull request: CB-10351: Make Events page a reference

Posted by nikhilkh <gi...@git.apache.org>.
Github user nikhilkh commented on the pull request:

    https://github.com/apache/cordova-docs/pull/480#issuecomment-179025411
  
    I'm assuming your grep'd for any incoming links to the files that you are deleting.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-docs pull request: CB-10351: Make Events page a reference

Posted by riknoll <gi...@git.apache.org>.
Github user riknoll commented on a diff in the pull request:

    https://github.com/apache/cordova-docs/pull/480#discussion_r51650131
  
    --- Diff: www/static/js/docs.js ---
    @@ -40,7 +40,7 @@ $(document).ready(function () {
     
         // Table of Contents
         $('#page-toc').toc({
    -        'selectors':         'h1,h2,h3,h4,h5,h6', // elements to use as headings
    +        'selectors':         'h1,h2', // elements to use as headings
    --- End diff --
    
    I didn't notice this. We do need this change, but it should be in a separate commit/JIRA. The reason for this @dblotsky is that certain longer pages (like the upcoming single page platforms guide) have a lot of headers that only serve to clutter the toc. Same with reference pages; every attribute does not need a toc entry.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


[GitHub] cordova-docs pull request: CB-10351: Make Events page a reference

Posted by sarangan12 <gi...@git.apache.org>.
Github user sarangan12 commented on the pull request:

    https://github.com/apache/cordova-docs/pull/480#issuecomment-178857041
  
    @riknoll Added link to Android Life Cycle Guide


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org