include the global cordova variable on the window object

This commit is contained in:
davetayls
2015-01-27 10:21:43 +00:00
parent b3324f6916
commit 03194c9dfe
2 changed files with 7 additions and 1 deletions

View File

@@ -8,6 +8,8 @@
console.log('cordova.version: ' + cordova.version + ', cordova.platformId: ' + cordova.platformId);
console.log(typeof window.cordova);
cordova.exec(null, null, "NativeClassName", "MethodName");
cordova.define('mymodule', (req, exp, mod)=> {
@@ -286,4 +288,4 @@ db.transaction(
//----------------------------------------------------------------------
navigator.notification.vibrate(100);
navigator.notification.vibrateWithPattern([100, 200, 200, 150, 50], 3);
setTimeout(navigator.notification.cancelVibration, 1000);
setTimeout(navigator.notification.cancelVibration, 1000);

View File

@@ -72,6 +72,10 @@ interface Document {
removeEventListener(type: string, listener: (ev: Event) => any, useCapture?: boolean): void;
}
interface Window {
cordova:Cordova;
}
// cordova/argscheck module
interface ArgsCheck {
checkArgs(argsSpec: string, functionName: string, args: any[], callee?: any): void;