Path: blob/main/files/en-us/mozilla/add-ons/webextensions/api/runtime/setuninstallurl/index.md
6552 views
------{{AddonSidebar()}}
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
Parameters
url:
string. URL to be opened after the extension is uninstalled. This URL must have anhttporhttpsscheme. Set it to an empty string to not open a new tab upon uninstallation.
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
{{Compat}}
Examples
{{WebExtExamples}}
Note: This API is based on Chromium's
chrome.runtimeAPI. This documentation is derived fromruntime.jsonin the Chromium code.