mirror of
https://github.com/EddyVerbruggen/Toast-PhoneGap-Plugin.git
synced 2025-02-24 10:12:53 +08:00
17 lines
414 B
JavaScript
Executable File
17 lines
414 B
JavaScript
Executable File
function Toast() {
|
|
}
|
|
|
|
Toast.prototype.show = function (message, duration, position, successCallback, errorCallback) {
|
|
cordova.exec(successCallback, errorCallback, "Toast", "show", [message, duration, position]);
|
|
};
|
|
|
|
Toast.install = function () {
|
|
if (!window.plugins) {
|
|
window.plugins = {};
|
|
}
|
|
|
|
window.plugins.toast = new Toast();
|
|
return window.plugins.toast;
|
|
};
|
|
|
|
cordova.addConstructor(Toast.install); |