Class: CommonUtils

.v3. CommonUtils

new mmir.compat.v3.CommonUtils()

Methods

asyncloadAllCordovaPlugins(pluginsPath, cbFunction){Promise}

Load all plugins (i.e. JavaScript interfaces for Cordova v2 / JavaScript-impl. plugins).
Name Type Description
pluginsPath String optional OPTIONAL Path of the plugins which should be loaded, e.g. mmirf/plugins/ If omitted: the default plugin-path is used (see mmir.compat.v3.Constants#getPluginsPath)
cbFunction function optional OPTIONAL The function that should be executed after the plugins are loaded. If the execution of following functions is dependent on the present of plugins, they should be triggered from inside the callback-function
Returns:
Type Description
Promise a Deferred.promise (see loadImpl())

asyncsetToCompatibilityMode(success, requireFunction){Promise}

Set to "backwards compatibility mode" (for pre version 2.0). This function re-adds deprecated and removed functions and properties to the CommonUtils instance. NOTE that once set to compatibility mode, it cannot be reset to non-compatibility mode. NOTE: Requires jQuery to be present.
Name Type Description
success function optional a callback function that is invoked, after compatibility mode was set (alternatively the returned promise can be used).
requireFunction function optional the require-function that is configured for loading the compatibility module/file. Normally, this would be the function mmir.require. If omitted, the default (local dependency) require function will be used. NOTE: this argument is positional, i.e. argument success must be present, if you want to specify this argument
Deprecated
  • use only for backwards compatibility
    Returns:
    Type Description
    Promise a deferred promise that is resolved, after compatibility mode was set