Details of a script injection

interface ScriptInjection {
    args?: any[];
    files?: string[];
    func?: () => void;
    injectImmediately?: boolean;
    target: InjectionTarget;
    world?: "ISOLATED";
}
Index
args?: any[]

The arguments to curry into a provided function. This is only valid if the func parameter is specified. These arguments must be JSON-serializable.

files?: string[]

The path of the JS files to inject, relative to the extension's root directory. Exactly one of files and func must be specified.

func?: () => void

A JavaScript function to inject. This function will be serialized, and then deserialized for injection. This means that any bound parameters and execution context will be lost. Exactly one of files and func must be specified.

injectImmediately?: boolean

Whether the injection should be triggered in the target as soon as possible (but not necessarily prior to page load).

Details specifying the target into which to inject the script.

world?: "ISOLATED"