userScripts.ScriptSource

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

Type

Values of this type are an object containing these properties:

file Optional

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

allFrames Optional

code. JavaScript code for the user script.

file or code must be specified, not both.

Browser compatibility

desktop mobile
Chrome
Edge
Firefox
Opera
Safari
Firefox for Android
Safari on iOS
ScriptSource
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

Legend

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

Full support
Full support
No support
No support