Injects a script into a target context. By default, the script will be run
at document_idle, or immediately if the page has already
loaded. If the injectImmediately property is set, the script
will inject without waiting, even if the page has not finished loading. If
the script evaluates to a promise, the browser will wait for the promise
to
settle and return the resulting value.
|injection|: The details of the script which to inject.
|Returns|: Returns a Promise which resolves upon completion of the
injection. The resulting array contains the result of execution for each
frame where the injection succeeded.
Returns all dynamically registered content scripts for this extension
that match the given filter.
|filter|: An object to filter the extension's dynamically registered
scripts.
Inserts a CSS stylesheet into a target context.
If multiple frames are specified, unsuccessful injections are ignored.
|injection|: The details of the styles to insert.
|Returns|: Returns a Promise which resolves upon completion of the
insertion.
Registers one or more content scripts for this extension.
|scripts|: Contains a list of scripts to be registered. If there are
errors during script parsing/file validation, or if the IDs specified
already exist, then no scripts are registered.
|Returns|: Returns a Promise which resolves once scripts have been
fully registered or rejects if an error has occurred.
Removes a CSS stylesheet that was previously inserted by this extension
from a target context.
|injection|: The details of the styles to remove. Note that the
css, files, and origin properties
must exactly match the stylesheet inserted through insertCSS.
Attempting to remove a non-existent stylesheet is a no-op.
|Returns|: Returns a Promise which resolves upon the completion of the
removal.
Unregisters content scripts for this extension.
|filter|: If specified, only unregisters dynamic content scripts which
match the filter. Otherwise, all of the extension's dynamic content
scripts are unregistered.
|Returns|: Returns a Promise which resolves once scripts have been
unregistered or rejects if an error has occurred.
Updates one or more content scripts for this extension.
|scripts|: Contains a list of scripts to be updated. A property is only
updated for the existing script if it is specified in this object. If
there are errors during script parsing/file validation, or if the IDs
specified do not correspond to a fully registered script, then no scripts
are updated.
|Returns|: Returns a Promise which resolves once scripts have been
updated or rejects if an error has occurred.