userScripts.WorldProperties
The configuration of a USERSCRIPT execution environment. Used in userScripts.configureWorld and userScripts.getWorldConfigurations.
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- :
string. The identifier for the world. Values with leading underscores (_) are reserved. The maximum length is 256 characters. Defaults to the defaultUSER_SCRIPTworld (""). To run a user script in this world, pass this value as theworldIdproperty in userScripts.RegisteredUserScript when registering or updating a user script. csp- :
string. The world's Content Security Policy (CSP). Defaults to the default CSP for content scripts, which prohibits dynamic code execution, such aseval(). messaging- :
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.
h2