Skip to content

Wrapping your Plugin's JavaScript

shazron edited this page Apr 11, 2012 · 2 revisions
// ///////////////////
(function(){
// ///////////////////

// get local ref to global PhoneGap/Cordova/cordova object for exec function
var cordovaRef = window.PhoneGap || window.Cordova || window.cordova; // old to new fallbacks

// YOUR CODE HERE! 
// NOTE: Replace any PhoneGap, Cordova or cordova references with cordovaRef above

// ///////////////////
})();
// ///////////////////
Clone this wiki locally