Skip to content

Wrapping your Plugin's JavaScript

jromero edited this page Sep 5, 2012 · 6 revisions
// ///////////////////
(function(gap){
// ///////////////////

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

// the variables below support old to new references ///////////////////
})(window.PhoneGap || window.Cordova || window.cordova);
// ///////////////////

RECOMMENDED FOR 1.6 or greater: Defining Your Plugin as a Cordova Module

Clone this wiki locally