Use the chrome.webstore API to initiate app and extension installations 'inline' from your site.
Use the chrome.webstore API to initiate app and extension installations 'inline' from your site. * available since Chrome 26 * https://developer.chrome.com/apps/webstore
(install)
(install url)
(install url success-callback)
|url| - If you have more than one <link> tag on your page with the chrome-webstore-item relation, you can choose which item you'd like to install by passing in its URL here. If it is omitted, then the first (or only) link will be used. An exception will be thrown if the passed in URL does not exist on the page. |success-callback| - This function is invoked when inline installation successfully completes (after the dialog is shown and the user agrees to add the item to Chrome). You may wish to use this to hide the user interface element that prompted the user to install the app or extension.
This function returns a core.async channel of type promise-chan
which eventually receives a result value.
Signature of the result value put on the channel is [error error-code] where:
|error| - The failure detail. You may wish to inspect or log this for debugging purposes, but you should not rely on specific strings being passed back. |error-code| - The error code from the stable set of possible errors.
In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error.
|url| - If you have more than one <link> tag on your page with the chrome-webstore-item relation, you can choose which item you'd like to install by passing in its URL here. If it is omitted, then the first (or only) link will be used. An exception will be thrown if the passed in URL does not exist on the page. |success-callback| - This function is invoked when inline installation successfully completes (after the dialog is shown and the user agrees to add the item to Chrome). You may wish to use this to hide the user interface element that prompted the user to install the app or extension. This function returns a core.async channel of type `promise-chan` which eventually receives a result value. Signature of the result value put on the channel is [error error-code] where: |error| - The failure detail. You may wish to inspect or log this for debugging purposes, but you should not rely on specific strings being passed back. |error-code| - The error code from the stable set of possible errors. In case of an error the channel closes without receiving any value and relevant error object can be obtained via chromex.error/get-last-error. https://developer.chrome.com/apps/webstore#method-install.
(tap-all-events chan)
Taps all valid non-deprecated events in chromex.app.webstore namespace.
Taps all valid non-deprecated events in chromex.app.webstore namespace.
(tap-on-download-progress-events channel & args)
Fired periodically with the download progress of an inline install. In order to receive notifications about this event, listeners must be registered before the inline installation begins.
Events will be put on the |channel| with signature [::on-download-progress [percent-downloaded]] where:
|percent-downloaded| - The progress of the download, between 0 and 1. 0 indicates no progress; 1.0 indicates complete.
Note: |args| will be passed as additional parameters into Chrome event's .addListener call.
https://developer.chrome.com/apps/webstore#event-onDownloadProgress.
Fired periodically with the download progress of an inline install. In order to receive notifications about this event, listeners must be registered before the inline installation begins. Events will be put on the |channel| with signature [::on-download-progress [percent-downloaded]] where: |percent-downloaded| - The progress of the download, between 0 and 1. 0 indicates no progress; 1.0 indicates complete. Note: |args| will be passed as additional parameters into Chrome event's .addListener call. https://developer.chrome.com/apps/webstore#event-onDownloadProgress.
(tap-on-install-stage-changed-events channel & args)
Fired when an inline installation enters a new InstallStage. In order to receive notifications about this event, listeners must be registered before the inline installation begins.
Events will be put on the |channel| with signature [::on-install-stage-changed [stage]] where:
|stage| - The InstallStage that just began.
Note: |args| will be passed as additional parameters into Chrome event's .addListener call.
https://developer.chrome.com/apps/webstore#event-onInstallStageChanged.
Fired when an inline installation enters a new InstallStage. In order to receive notifications about this event, listeners must be registered before the inline installation begins. Events will be put on the |channel| with signature [::on-install-stage-changed [stage]] where: |stage| - The InstallStage that just began. Note: |args| will be passed as additional parameters into Chrome event's .addListener call. https://developer.chrome.com/apps/webstore#event-onInstallStageChanged.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close