MDN self-hosted library · e01.org

userScripts.WorldProperties

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

no runnable cells webextension-api-type upstream source

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 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
  • : 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
  • : 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

Browser compatibility