RegisteredUserScript.unregister()
The unregister()
method of the RegisteredUserScript
object unregisters the user scripts represented by the object, user scripts that were registered using userScripts.register()
.
Note: User Scripts are automatically unregistered when the related extension page (from which the user scripts were registered) is unloaded, so you should register a user script from an extension page that persists at least as long as you want the user scripts to stay registered.
Syntax
const registeredUserScript = await browser.userScripts.register(
userScriptOptions // object
);
…
await registeredUserScript.unregister()
Parameters
None.
Return value
A Promise
that is resolved once the user scripts are unregistered. The promise does not return a value.
Browser compatibility
Report problems with this compatibility data on GitHubwebextensions-desktop | webextensions-mobile | |||||
---|---|---|---|---|---|---|
unregister | ChromeNo supportNo | EdgeNo supportNo | FirefoxFull support68
| OperaNo supportNo | SafariNo supportNo | Firefox for AndroidFull support68 |
Legend
- Full support
- Full support
- No support
- No support
- User must explicitly enable this feature.
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.