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 defaultUSER_SCRIPT
world (""). To run a user script in this world, pass this value as theworldId
property inuserScripts.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 aseval()
. messaging
Optional-
boolean
. Whether theruntime.sendMessage
andruntime.connect
methods are exposed to the user script world. Defaults to hiding these messaging APIs. Theruntime.onUserScriptMessage
andruntime.onUserScriptConnect
event handlers are triggered when these methods are called.