runtime.setUninstallURL()
Sets the URL to be visited when the extension is uninstalled. This may be used to clean up server-side data, do analytics, or implement surveys. The URL can be a maximum 255 characters.
This is an asynchronous function that returns a Promise
.
Syntax
var settingUrl = browser.runtime.setUninstallURL(
url // string
)
Parameters
Return value
A Promise
that will be fulfilled with no arguments when the URL has been set, or rejected with an error message if the operation failed.
Browser compatibility
Report problems with this compatibility data on GitHubwebextensions-desktop | webextensions-mobile | |||||
---|---|---|---|---|---|---|
setUninstallURL | ChromeFull support41 | EdgeFull support15 | FirefoxFull support47 | OperaFull support28 | SafariPartial support14
| Firefox for AndroidFull support48 |
Legend
- Full support
- Full support
- Partial support
- Partial support
- See implementation notes.
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Examples
function onSetURL() {
console.log("set uninstall URL");
}
function onError(error) {
console.log(`Error: ${error}`);
}
var settingUrl = browser.runtime.setUninstallURL("https://example.org");
settingUrl.then(onSetURL, onError);
Acknowledgements
This API is based on Chromium's chrome.runtime
API. This documentation is derived from runtime.json
in the Chromium code.
Microsoft Edge compatibility data is supplied by Microsoft Corporation and is included here under the Creative Commons Attribution 3.0 United States License.