Skip to content

Instantly share code, notes, and snippets.

@m00sey
Created Jul 8, 2011
Embed
What would you like to do?
Updates registering plugins
navigator.tp.showLong('bar');
var Toasty = function() {
};
Toasty.prototype.showLong = function(message, win, fail) {
PhoneGap.exec(win, fail, "Toasty", "show_long", [message]);
};
Toasty.prototype.showShort = function(message, win, fail) {
PhoneGap.exec(win, fail, "Toasty", "show_short", [message]);
};
navigator.tp = new Toasty();
<plugin name="Toasty" value="com.package.ToastPlugin"/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment