()
| 221 | } |
| 222 | |
| 223 | async function install() { |
| 224 | try { |
| 225 | await Promise.all([ |
| 226 | loadAd(this), |
| 227 | installPlugin(plugin.source || id, plugin.name, purchaseToken), |
| 228 | ]); |
| 229 | if (onInstall) onInstall(plugin); |
| 230 | installed = true; |
| 231 | update = false; |
| 232 | if (!plugin.price) { |
| 233 | await helpers.showInterstitialIfReady(); |
| 234 | } |
| 235 | render(); |
| 236 | } catch (err) { |
| 237 | window.log("error", err); |
| 238 | helpers.error(err); |
| 239 | } |
| 240 | } |
| 241 | |
| 242 | async function uninstall() { |
| 243 | try { |
no test coverage detected