UNPKG

cc.fovea.cordova.purchase

Version:

Cordova Purchase plugin for iOS, Android, Windows (AppStore, Play, UWP)

38 lines (30 loc) 802 B
(function() { /// ## <a name="off"></a>*store.off(callback)* /// Unregister a callback. Works for callbacks registered with `ready`, `when`, `once` and `error`. /// /// Example use: /// /// ```js /// var fun = function(product) { /// // Product loaded while the store screen is visible. /// // Refresh some stuff. /// }; /// /// store.when("product").loaded(fun); /// ... /// [later] /// ... /// store.off(fun); /// ``` /// store.off = function(callback) { // Unregister from `ready` store.ready.unregister(callback); // Unregister from `when` and `once` store.when.unregister(callback); // Unregister from `order` store.order.unregister(callback); // Unregister from `error` store.error.unregister(callback); }; })();