Google Chrome Extensions

chrome.webstore

API Reference: chrome.webstore

Methods

install

chrome.webstore.install(string url, function successCallback)

Parameters

url ( optional string )
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.
successCallback ( optional function )
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.

Callback function

If you specify the failureCallback parameter, it should specify a function that looks like this:

function(string error) {...};
error ( string )
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.