No description, website, or topics provided.
JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
LICENSE
README.md
bower.json
deviceReady.js

README.md

deviceReady

An AMD loader plugin for detecting the device ready event on Apache Cordova (aka Phonegap) devices. When running in the desktop browser, it will "detect" this event immediately. It also signals the environment in which the code is running (Cordova or desktop browser) to make dispatching on environment more convenient.

Known to work in RequireJS, but should work in other AMD loaders that support the same loader plugin API.

Docs

This plugin works mostly like the RequireJS DOM Ready plugin:

require(['deviceReady'], function(deviceReady) {
  deviceReady(function(isCordova) {
    // ...
  });
});

Alternatively, you can use it through the RequireJS Loader Plugin API:

require(['deviceReady!'], function(isCordova) {
  // ...
});

The isCordova argument is a boolean which will be false in desktop browsers and true in Cordova.

License

Dual-licensed -- new BSD or MIT.