userScripts.resetWorldConfiguration()
Resets the configuration of a USERSCRIPT world set by userScripts.configureWorld to the defaults specified in userScripts.WorldProperties. When the default world is reset, all worlds without an explicit configuration are also reset.
Resets the configuration of a `USER_SCRIPT` world set by userScripts.configureWorld to the defaults specified in userScripts.WorldProperties. When the default world is reset, all worlds without an explicit configuration are also reset.
Changes to world configurations only apply to new instances of the world: A configuration won't apply to a world initialized by the execution of a user script in a document until the document is reloaded. However, the browser may revoke certain privileges when a configuration is updated. For example, message calls from a `USER_SCRIPT` world may fail when `messaging` is reset to `false`.
## Syntax
```js-nolint
let resettingWorldConfiguration = browser.userScripts.resetWorldConfiguration(
worldId // optional string
);
```
### Parameters
- `worldId`
- : `string` The ID of the `USER_SCRIPT` world to reset. If omitted or empty, resets the configuration of the default world and all worlds without a configuration set by userScripts.configureWorld.
### Return value
A Promise fulfilled with no arguments if the world configuration is reset. If the request fails, the promise is rejected with an error message.
h2
## Browser compatibility
Cite this
"userScripts.resetWorldConfiguration()". MDN Web Docs. CC BY-SA 2.5 (MDN). https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/userScripts/resetWorldConfiguration JSON record · API collection · BibTeX · RIS · CSL-JSON · citation policy