The recommended mechanism for implementing PhoneGap is to use the AppFramework, or load PhoneGap (Apache Cordova) in the same way it does.
When you want to use the same HTML for every platform, include the Cordova files as .javascript files, then dynamically load that code based on which platform is running. The Cordova files are packaged in the <SMP_HOME> \UnwiredPlatform\MobileSDK\HybridApp\Container\<Platform> directories.
function loadPhoneGap() { var jsfile = null; var pre = ""; var language = hwc.getURLParam("lang"); if (!(language === undefined) && (language.length > 0)){ pre = "../"; } if (hwc.isAndroid()) { jsfile = pre + "js/android/cordova-2.0.0.javascript"; } else if (hwc.isIOS()) { jsfile = pre + "js/ios/cordova-2.0.0.javascript"; } else if (hwc.isBlackBerry()) { jsfile = pre + "js/blackberry/cordova-2.0.0.javascript"; } if (jsfile) { var req = null; if (window.XMLHttpRequest) { req = new XMLHttpRequest(); } else {// code for IE6, IE5 req = new ActiveXObject("Microsoft.XMLHTTP"); } req.open("GET", jsfile, false); req.send(null); // Need to call eval with the global context window[ "eval" ].call( window, req.responseText ); } } loadPhoneGap();