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

desktop mobile
Chrome
Edge
Firefox
Opera
Safari
Firefox for Android
Safari on iOS
WorldProperties
Chrome – Full support
Chrome 120 (Release date: 2023-12-05)
footnote Full support
Edge – Full support
Edge 120 (Release date: 2023-12-07)
footnote Full support
Firefox – Full support
Firefox 136 (Release date: 2025-03-04)
footnote Full support
Opera – Full support
Opera 106 (Release date: 2023-12-19)
footnote Full support
Safari – No support
Safari
footnote No support
Firefox for Android – Full support
Firefox for Android 138 (Release date: 2025-04-29)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote No support
worldId
Chrome – Full support
Chrome 133 (Release date: 2025-02-04)
footnote Full support
Edge – Full support
Edge 133 (Release date: 2025-02-06)
footnote Full support
Firefox – Full support
Firefox 136 (Release date: 2025-03-04)
footnote Full support
Opera – Full support
Opera 118 (Release date: 2025-04-15)
footnote Full support
Safari – No support
Safari
footnote No support
Firefox for Android – Full support
Firefox for Android 138 (Release date: 2025-04-29)
footnote Full support
Safari on iOS – No support
Safari on iOS
footnote No support

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support
No support
No support