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:
worldIdOptional-
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 inuserScripts.RegisteredUserScriptwhen registering or updating a user script. cspOptional-
string. The world's Content Security Policy (CSP). Defaults to the default CSP for content scripts, which prohibits dynamic code execution, such aseval(). messagingOptional-
boolean. Whether theruntime.sendMessageandruntime.connectmethods are exposed to the user script world. Defaults to hiding these messaging APIs. Theruntime.onUserScriptMessageandruntime.onUserScriptConnectevent handlers are triggered when these methods are called.
Browser compatibility
| desktop | mobile | ||||||
|---|---|---|---|---|---|---|---|
WorldProperties
|
|
|
|
|
|
|
|
worldId
|
|
|
|
|
|
|
|
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- No support
- No support