2 * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT
4 * The content of this file has been generated based on the WebExtensions API
5 * JSONSchema using the following command:
7 * export SCRIPT_DIR="toolkit/components/extensions/webidl-api"
8 * mach python $SCRIPT_DIR/GenerateWebIDLBindings.py -- runtime
10 * More info about generating webidl API bindings for WebExtensions API at:
12 * https://firefox-source-docs.mozilla.org/toolkit/components/extensions/webextensions/webidl_bindings.html
14 * A short summary of the special setup used by these WebIDL files (meant to aid
15 * webidl peers reviews and sign-offs) is available in the following section:
17 * https://firefox-source-docs.mozilla.org/toolkit/components/extensions/webextensions/webidl_bindings.html#review-process-on-changes-to-webidl-definitions
20 /* This Source Code Form is subject to the terms of the Mozilla Public
21 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
22 * You can obtain one at http://mozilla.org/MPL/2.0/.
24 * You are granted a license to use, reproduce and create derivative works of
28 // WebIDL definition for the "runtime" WebExtensions API
29 [Exposed=(ServiceWorker), LegacyNoInterfaceObject]
30 interface ExtensionRuntime {
33 [Throws, WebExtensionStub="Async"]
34 any openOptionsPage(optional Function callback);
36 [Throws, WebExtensionStub]
39 [Throws, WebExtensionStub="ReturnsString"]
40 DOMString getURL(DOMString path);
42 [Throws, WebExtensionStub="Async"]
43 any setUninstallURL(DOMString url, optional Function callback);
44 [Throws, WebExtensionStub="Async"]
45 any setUninstallURL(optional Function callback);
47 [Throws, WebExtensionStub="NoReturn"]
50 [Throws, WebExtensionStub="ReturnsPort"]
51 ExtensionPort connect(DOMString extensionId, any connectInfo);
52 [Throws, WebExtensionStub="ReturnsPort"]
53 ExtensionPort connect(any connectInfo);
54 [Throws, WebExtensionStub="ReturnsPort"]
55 ExtensionPort connect();
57 [Throws, WebExtensionStub="ReturnsPort"]
58 ExtensionPort connectNative(DOMString application);
60 [Throws, WebExtensionStub="AsyncAmbiguous"]
61 any sendMessage(any... args);
63 [Throws, WebExtensionStub="Async"]
64 any sendNativeMessage(DOMString application, any message, optional Function responseCallback);
66 [Throws, WebExtensionStub="Async"]
67 any getBrowserInfo(optional Function callback);
69 [Throws, WebExtensionStub="Async"]
70 any getPlatformInfo(optional Function callback);
74 [Replaceable, SameObject]
75 readonly attribute ExtensionEventManager onStartup;
77 [Replaceable, SameObject]
78 readonly attribute ExtensionEventManager onInstalled;
80 [Replaceable, SameObject]
81 readonly attribute ExtensionEventManager onUpdateAvailable;
83 [Replaceable, SameObject]
84 readonly attribute ExtensionEventManager onConnect;
86 [Replaceable, SameObject]
87 readonly attribute ExtensionEventManager onConnectExternal;
89 [Replaceable, SameObject]
90 readonly attribute ExtensionEventManager onMessage;
92 [Replaceable, SameObject]
93 readonly attribute ExtensionEventManager onMessageExternal;
98 readonly attribute any lastError;
101 readonly attribute DOMString id;