Common Cordova
PUBLISHED
You can handle common Cordova functionality, such as interfaces for success and error handlers.
The Cordova API is mandatory for Tizen mobile, wearable, and TV profiles, which means that it is supported on all mobile, wearable, and TV devices. All mandatory APIs are supported on the Tizen Emulators.
The Cordova API defines a global interface, containing only 1 empty member: cordova. The window element implements the interface.
Cordova defines a common interface for success and error callbacks:
- The success callbacks have no parameters, and return no value.
- The error callbacks have 1 parameter:
function f(error) {}The error callback parameter has the following properties:
code: Number representing the type of the errorname: Short text representing the type of the errormessage: Text containing information about the error
deviceready event occurs):
document.addEventListener('deviceready', onDeviceReady, false);
function onDeviceReady() {
console.log('Cordova features now available');
console.log('Connection type: ' + navigator.connection.type);
}
Was this document helpful?
We value your feedback. Please let us know what you think.
