userScripts.WorldProperties

The configuration of a USER_SCRIPT execution environment. Used in userScripts.configureWorld and userScripts.getWorldConfigurations.

Type

Values of this type are an object containing these properties:

worldId Optional

string. The identifier for the world. Values with leading underscores (_) are reserved. The maximum length is 256 characters. Defaults to the default USER_SCRIPT world (""). To run a user script in this world, pass this value as the worldId property in userScripts.RegisteredUserScript when registering or updating a user script.

csp Optional

string. The world's Content Security Policy (CSP). Defaults to the default CSP for content scripts, which prohibits dynamic code execution, such as eval().

messaging Optional

boolean. Whether the runtime.sendMessage and runtime.connect methods are exposed to the user script world. Defaults to hiding these messaging APIs. The runtime.onUserScriptMessage and runtime.onUserScriptConnect event handlers are triggered when these methods are called.

Browser compatibility

BCD tables only load in the browser