Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,14 @@ await browser.scripting.registerContentScripts(

### Return value

A [`Promise`](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) fulfilled with no arguments or rejected when there are errors. Errors can occur during script parsing and file validation or if the IDs specified exist. When an error occurs, no scripts are registered.
A [`Promise`](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) is fulfilled with no arguments or rejected when there are errors. Errors can occur during script parsing and file validation or if the IDs specified exist. When an error occurs, no scripts are registered.

> [!NOTE]
> Persistence of registered scripts:
>
> - In Firefox, registered scripts are removed when the extension is unloaded or reloaded.
> - In Chrome, registered scripts persist across restarts if `persistAcrossSessions: true`, but they are unregistered when the extension is updated.
> - The `persistAcrossSessions` property controls whether scripts remain registered across browser sessions.

## Examples

Expand Down