Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions notNeededPackages.json
Original file line number Diff line number Diff line change
Expand Up @@ -3833,6 +3833,10 @@
"libraryName": "libra-core",
"asOfVersion": "1.0.5"
},
"libxmljs": {
"libraryName": "libxmljs",
"asOfVersion": "1.0.1"
},
"lifeomic__axios-fetch": {
"libraryName": "@lifeomic/axios-fetch",
"asOfVersion": "2.0.0"
Expand Down
18 changes: 18 additions & 0 deletions types/firefox-webext-browser/firefox-webext-browser-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,3 +124,21 @@ console.log(filter.status);

browser.storage.session.get("sessionObject");
browser.storage.session.set({ "sessionObject": "value" });

browser.scripting.executeScript({
target: { tabId: 1 },
func: () => {},
});

browser.scripting.executeScript({
target: { tabId: 1 },
// @ts-expect-error
args: [true],
func: (_n: number) => {},
});

browser.scripting.executeScript({
target: { tabId: 1 },
args: [0, "", false, [], {}],
func: (_n: number, _s: string, _b: boolean, _a: [], _o: {}) => {},
});
9 changes: 5 additions & 4 deletions types/firefox-webext-browser/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4664,11 +4664,11 @@ declare namespace browser.runtime {
declare namespace browser.scripting {
/* scripting types */
/** Details of a script injection */
interface ScriptInjection {
interface ScriptInjection<Args extends any[] = 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.
*/
args?: any[] | undefined;
args?: Args | undefined;
/**
* The path of the JS files to inject, relative to the extension's root directory. Exactly one of `files` and `func` must be specified.
*/
Expand All @@ -4677,7 +4677,7 @@ declare namespace browser.scripting {
* 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.
*/
// eslint-disable-next-line @typescript-eslint/no-invalid-void-type
func?: () => void | undefined;
func?: (...args: Args) => void | undefined;
/** Details specifying the target into which to inject the script. */
target: InjectionTarget;
world?: ExecutionWorld | undefined;
Expand Down Expand Up @@ -4801,7 +4801,8 @@ declare namespace browser.scripting {
* Injects a script into a target context. The script will be run at `document_idle`.
* @param injection The details of the script which to inject.
*/
function executeScript(injection: ScriptInjection): Promise<InjectionResult[]>;
// eslint-disable-next-line @definitelytyped/no-unnecessary-generics
function executeScript<T extends any[]>(injection: ScriptInjection<T>): Promise<InjectionResult[]>;

/**
* Inserts a CSS stylesheet into a target context. If multiple frames are specified, unsuccessful injections are ignored.
Expand Down
5 changes: 0 additions & 5 deletions types/libxmljs/.npmignore

This file was deleted.

225 changes: 0 additions & 225 deletions types/libxmljs/index.d.ts

This file was deleted.

Loading