blob: 31cbd2d01239d79f5abb53706727928da82a6cd2 [file] [log] [blame]
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
[
{
"namespace": "webstore",
"description": "Use the <code>chrome.webstore</code> API to initiate app and extension installations \"inline\" from your site.",
"functions": [
{
"name": "install",
"allowAmbiguousOptionalArguments": true,
"parameters": [
{
"name": "url",
"type": "string",
"optional": true,
"description": "If you have more than one <code>&lt;link&gt;</code> tag on your page with the <code>chrome-webstore-item</code> 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."
},
{
"name": "successCallback",
"type": "function",
"optional": true,
"parameters": [],
"description": "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."
},
{
"name": "failureCallback",
"type": "function",
"optional": true,
"parameters": [
{
"name": "error",
"type": "string",
"description": "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."
}
],
"description": "This function is invoked when inline installation does not successfully complete. Possible reasons for this include the user canceling the dialog, the linked item not being found in the store, or the install being initiated from a non-verified site."
}
]
} // install
]
} // webstore
]