MDN self-hosted library · e01.org

userScripts.ScriptSource

The code or source file for a user script. This describes the object values of the "js" property in execute() and RegisteredUserScript.

no runnable cells webextension-api-type upstream source

The code or source file for a user script. This describes the object values of the "js" property in execute() and RegisteredUserScript.

Type

Values of this type are an object containing these properties:

  • file
  • : string. The path of the file containing the user script code. The path is relative to the extension's root directory.
  • code
  • : string. JavaScript code for the user script.

file or code must be specified, not both.

h2

Browser compatibility